it's no big deal, I don't think he is really going to care, its normal
Urologists see this all the time... get that lump checked ASAP.
I had a similar situation last year. I went to a urologist, and he did a pretty thorough exam. I didn't expect a prostate exam, but that was painless--really it didn't feel much like anything. I didn't expect him to press on my prostate. As soon as he did this, what seemed like an enormous amount of clear seminal fluid was released. I was speechless--it felt like I was peeing. At any rate, he turned me around, grabbed my penis, and smeared the tip onto a microscope slide. He gave me some paper towels, and left to examine the fluid. No infections present. I then went to have a testicular ultrasound, which was conducted by a female. It was embarassing, but no adverse events; if anything, the anxiety caused me to shrink.
Go to a urologist, and don't worry about an erection. Most everyone responds to stimulation--it's normal. When you are 80, you'll wish you get an erection in front of anyone.
Don't worry. If you get erect, the doctor probably won't give it any of his/her attention. If it's a good doctor of course.