I had this problem in high school. I would talk to your counselor and teachers about
yoru symptoms. They only give 5 minute bathroom breaks and when you have IBS that really isn't enough time if you have an emergency.
I find that exercise helps the stomach quite a bit and takes the stress levels and toxins out, in return calming your stomach.
Eat very healthy and stay away from fried, oily, and saucy foods, and milk.
It's great ate your age that you recognize that you have a problem and have to fix it. I missed almost half of my schooling and I wish I could of done things differently.
Eddie