It might be due to fungal infection
. When its scratched repeatedly, it can get secondarily infected with bacteria too.
Keep the area dry.
You may use clotrimazole
powders/ ointments applied thrice a day for a week.
If not improving, you might have to visit your doctor as she might need oral medications too.
If secondary infection is seen, she will need antibiotic ointments too like Mupirocin
for a week.
But I would say, best is to visit a dermatologist
, get the diagnosis confirmed and then get her treated.
Hope my answer helps you.