Balanitis is on the head of your penis, so that's not it.
When you are masturbating, do you use a cream or lotion, or anything for a lubrication? Have you recently tried something new? This could be an allergic reaction, or clogged pores from that.
It could be a fungal infection, as GuitarRox said, or contact dermatitis.
Let the area be for a couple of days, see what happens, and follow the instructions in that article on when to call the doctor.
Does it itch? Try not to panic. There are different things that can cause a rash on the penis and they are not emergencies or super serious. So, stay calm. Balanitis comes to mind. https://www.webmd.com/sexual-conditions/rash-on-penis#1 This can happen due to hygiene believe it or not. If you touched something with your hand and then touched your penis or if your penis touched it itself, you could have contact dermatitis. You could even just have psoriasis. This article gives guidance about when to call your doctor and they include if the rash is painful, has blisters, is spreading very quickly, red streaks down your penis. Any of that going on? Otherwise, here in the states, doctors are using telemedicine. I would call your primary care doctor and talk to them. Explain the situation. They may call something in for you and you can just make what is called an 'essential' trip to the pharmacy OR it can be delivered.