I don't think this is a fungus--much more likely to be irritation, which would be aggravated by masturbation or any friction. I advise you to apply 1% hydrocortisone, avoid friction, and overcome your embarrassment and see a doctor. There is nothing to be embarrassed about--looking at rashes wherever they may be is what we do. But you don't have to worry about fungus or infection.
Take care.
Dr. Rockoff