I'm guilty too of getting social-phobic when my guts are acting up. What if someone notices me going to the bathroom twice in 10 minutes? We just have to tell ourselves over and over again that we're entitled to go to the bathroom however many times that we want and, really, no one notices our comings and goings half as much as we think. Shoot, when I cover for the receptionist at lunchtime, people will walk right past me--some even tell me they're going out--and as soon as someone calls in for them: "I don't know where s/he is." Shows you how much attention I pay to other people's trips in and out the office door!
And I guess the other thing that people need to tell themselves is "If I have an accident, so what?" Just try and keep a change of pants and underwear on hand and then go about your business. If it happens, change your clothes. Even if someone notices something, no one with a shred of manners is going to say anything anyways. It's not like they're going to burn us at the stake if they catch us! And besides, there seems to be a lot of people out there in the world with stomach problems; most adults have probably had an accident at one time or another themselves and can sympathize.