How can I deal with a tough professor?

If not using the bathroom is more than an inconvenience for you, discuss it with your professor. Most people are embarrassed by other people’s bodily functions, and your prof will probably fold as soon as you open the discussion. I make accommodations for students all the time based on nothing more than a short conversation.

If that doesn’t work, discuss the matter with your doctor, and if the doctor agrees, bring it to the attention of your school’s ADA coordinator. If you warrant an accommodation, one will be made.