I don’t think there is a clean approach to still use an nn.Module, but disallow registering it inside the parent. You could check this code 3 and try to see, if changing the self._modules attribute might work, but note that this is an internal attribute and I don’t know what unwanted side effects you might trigger.
Maybe you could explain your use case a bit more so that we could think about another approach?