Um, it's what if the surgeon has diarrhea, not the patient being operated upon...
It's always ok for an individual to scrub out and take care of nature's call. (Remember on ER when Elizabeth was pregnant and assisting her jerky boss in a case? She had to pee, and he wouldn't dismiss her, so she asked the circulating nurse to catheterize her. That's when he let her go pee.) The idea is that the patient won't be ok if the surgeon isn't, first. If there are sufficient other qualified staff, the procedure can continue, or else it stops for a bit in a non-critical fashion. Obviously, for some serious or trauma surgeries, this isn't so easy -- you'd call in another surgeon if one was available, suck it up and deal, or poo in the loo faster than you ever had before.
That said, reasonable and forseeable prophylactic measures should be undertaken: if you drank a liter of Mt. Dew, pee first. If you've got giardia, don't scrub.