You can work on this issue by engaging in some anal training or anal play on your own. Start by using a dildo, plug, or dong that you will find comfortable. You don't want to start out by using something that is too large. You should definitely start out with something small. Use plenty of lube and play with it on your own. You'll eventually get comfortable with the sensations that you experience during penetration and during the motions of play. Think about how that feels similar, but also different, from actually needing to use the bathroom.
All that said, if you really do feel that you need to go to the bathroom then you should definitely stop and go to the bathroom.