No you're not the only one.
1) most surgeries are relatively short;
2) most surgeons have trained themselves to limit fluids/hold their urine for long periods of time
3) if a student really can no longer hold it, there should be no problem in excusing oneself to urinate during a longer case; if you excuse yourself multiple times or during very short cases, then it will appear as if you are leaving for another reason
4) surgeons can scrub out during cases, even if they don't have a resident. If the patient is stable, you aren't at a critical portion, it is permissible to scrub out and quickly attend to business (whether its urinating, vomiting, look at frozen section slides with pathologist etc) and return
5) you get busy and focused and don't even notice you need to urinate. I'll often go 8 hours without urinating while I'm in the office - clearly I have the opportunity and the facilities right there, I just get busy and forget/don't feel the urge.