If a teacher ever told me that I couldn't go the bathroom, I would laugh in their face and leave anyway. Of course they should be allowed to use the bathroom. My God.
what a silly question, if you gotta go, you gotta go. If you need to go, just do it, or stand there in front of the difficult teacher, and go on the floor. that will fix them:)