may be due to balanitis. Balanitis usually affects uncircumcised males. The rash may not necessarily be a sexually transmitted disease. It may be dermatitic or psoriatic secondary to mechanical trauma or injury.
Do you have a similar rash in other parts of your body?
Is the rash associated with itchiness or pain?
This may not be a fungal infection. A dermatitic or psoriatic component has to be excluded. Avoid wearing tight underpants to avoid further irritation. You may use mild and bland cleansers in washing the area.