Hi and thanks for the query.
A ring worm infection is actually a misnomer, there is no worm. It is actually a fungal infection that appears as a ring like rash which is red or pink in color.
Other than that parasites like round worms or thread worms do not infest the penis and do not appear in the foreskin.
You are uncircumsized and having redness and swelling like features in the foreskin is called balanitis. This is an infection often caused by bacteria and sometimes fungi.
In such a case, a visit to the doctor is warranted and a swab is taken. Antibacterial topical applications like Mupirocin or bacitracin are applied twice a day as empirical therapy and in severe cases, an oral antibiotic is started as well. The culture report is received in 3 days time and defines whether the infection is due to bacteria or fungus and then the appropriate therapy is prescribed.
So, the best course of action will be to see your doctor for this. Mean while, abstain from sexual intercourse and excessive rubbing of the foreskin. You can also take Sitz baths, by filling a tub of water with warm water about 3 to 4 inches in depth and putting an antiseptic in it. Sit in the tub for 15 to 20 minutes so that the swelling settles. Sitz baths are taken 3 to 4 times a day.
Let me know if you have further questions.