You can backpropagate gradient for any Variable that you have.
If you want to be able to backpropagate starting from intermediary layers, you will need your nn.Module to output the intermediary Variables corresponding to those so that you can call .backward on them.