Thank you for your query.
Without examining your daughter it is difficult to say the reason for the blood. I suggest that you consult your doctor who shall examine her and advise you accordingly. The description provided by you suggests an abscess
which may require antibiotic and anti-inflammatory medication. In case the abscess it large then incision and drainage
may be required.
Child remaining unattended in diapers for long time can give rise to infection of the skin.
I hope I have answered your query to your satisfaction.
Wishing your daughter an early recovery.
Rajiv K Khandelwal