Firsrly, to clear up one point, it is possible for some guys to pee with an erection (with varying degrees of difficulty or ease as the case may be) but not all. Some can and some can't.
Secondly, the urine of a healthy person is sterile and would, I think, be unlikely to cause any serious harm. However if you're at all concerned I'd have a quiet word with your GP just to make sure. In fact I'd probably do that anyway just to be on the safe side.
Finally, there is something to be said for a post coital pee (or post wank pee if you've masturbated) as it helps to flush everything out. A post coital pee is best done I think after you've withdrawn after intercourse. Whether you go to the toilet or decide to do it somewhere more interesting/naughty is, of course, entirely up to you.
