My husband said that in high school he had to wear a jockstrap with his penis pointed up because he got so many erections, and that he got this tip from a gym teacher who said it to all the guys in the class during a health lecture. So I guess it must be a pretty common problem.
I don't think avoiding masturbation will make you get fewer erections, it might be the opposite.
The gal behind the counter at the store was doubtless talking about you getting off work, not having sex.
Good luck, your new doctor might have some advice about whether masturbating more will help or hurt.
I can understand how this must be really embarrassing for you. I really hope that the second doctor can have some answers for you. I wish I could tell you what to do but I don't really have any experience with this. Best of luck to you.