Hi, Welcome to JustAnswer. I am a licensed veterinarian and I'd like to assist you today. This is probably an abscess of some kind (from a wound or a foreign body), and the infected drainage is drawing the flies. No matter the cause of the lump, however, the flies need to be kept away so they don't lay eggs that larvate and cause maggots.
There is an ointment called Fly Strike that can be applied for this purpose, but it is important for your vet to take a look and take care of any infection in the area. Since this is on the edge of his sheath, Rossy could have a sheath infection (balanoposthitis) which could be from a foreign body or a urinary tract infection. These would need to be diagnosed and treated specifically, as well as the probable maggot infestation that does exist.
Hope this is helpful. Do you have any further questions?