You can dry brush in the shower but you need to dry brush your skin once daily or twice daily before showering.
This way your skin will be free of any creams or other oils.
Once you've dry brushed before the shower then you should dry brush again while showering to wash away any flaked skin or anything else that may be on your skin.
So for best results dry brush before showering and while showering as well.