Urine is sterile but it will pick up microbes on its way out of the body, through the urethra, and the tip of the penis. So, if a guy has an infection, then it's possible to catch it by drinking their pee. It's the same way you'd get an infection from drinking out of the same cup as someone who has a cold or the flu.
C