i would say give it a couple months at least. if his dr. said that spontaneous erections can possibly correct it then i would just allow that to happen. just make sure that the room is a little chillier (not that i'm saying to make it really cold) when you change him, or get ready to give him a bath. i myself don't have a son, but i did help with my little brother, many of my friends' sons. with a few of them i realized the differences between them all and the way things were done. the friends that were quick with changes, and always had the place warm, NEVER got peed on, yet the friends that were really slow, and had the house a lil more 'crisp' would constantly notice a little erection, then seconds later get peed on. i know that every once in awhile i would let my daughter just lay there with nothing on to "air out" and sometimes she'd pee too...so just make sure you have something to quickly cover him...or make sure it's in the bath so you don't have a major mess, but if this could correct itself, why not give it a couple months. just call the dr. back and ask their opinion on how long it could take, or how long you should give it. and then decide for yourself how long is too long.
as for the pain involved, it's a painful procedure to go through no matter what age. i've seen them done on tv and the babies scream like your torturing them for a couple of minutes, then they're fine (i'm sure still sore). but i met someone who had gotten this done when he was in his late 30's because of his change in religion and he said it hurt, but it hadn't been the most painful thing he had gone through. i would assume that they would put some kind of numbing medicine on the area (maybe even give you something to put on it to numb it...i may be wrong). just talk to the dr. and get all the facts. that's the only way you'll truly be able to decide...YOU know what's best for your child. once you hear all the details involved in the procedure, including any pain relief, you'll know what's best. and it doesn't hurt to get their opinion on the pain he'll go through.
good luck, it's hard to have to choose something that seems so important for HIM in the future, when you have to, as the caring parent you sound like, decide what's more important...the way it will look when he's older, the pain he will go through, OR what possible affects it will have on him either way. i wish you the best, just remember you and his dad will know what's best for him when you know all the details!