The usual way to do this is to use the functional interface to redefine the forward
class ConstrainedConv2d(nn.Conv2d):
    def forward(self, input):
        return F.conv2d(input, self.weight.clamp(min=-1.0, max=1.0), self.bias, self.stride,
                        self.padding, self.dilation, self.groups)

The important bit here being the .clamp. For spectral norm, there is a utility in torch.nn.utils.
In IPython, you can get the forward of Conv2d using ?? nn.Conv2d to ensure feature parity (e.g. I left out the padding_mode).
Best regards
Thomas