Who made up that riddle? That's totally stupid. First of all you say the pipe is in a room...then you say its stuck in the ground.
So is it in a room or outside in the ground? If the pingpong ball is in the pipe and "barely fits" then you'd assume its wedged in fairly tightly. Tightly enough so that trying to remove it with a coat hanger would damage it. So if you peed in it, how would the pee get past the ball in order to float it out?? More than likely the pee would just sit on top. And geez...how much pee do three people have anyway? Must be a pretty small pipe.
If it were a rusty pipe, I'd say open up the coat hanger and dig away at the rust in the pipe until you flaked away enough to get the coat hanger past the pingpong ball without having to touch it. If the pipe is rusted, then removing the rust is not "damaging the pipe"--its cleaning off the pipe. Coat hangers aren't that thick so it wouldn't take much digging. Then slightly curve the coathanger and gently slide it underneath the pingpong ball and gently pull upwards until the ball is dislodged.
Men!! Always using the little brain instead of the big brain.