History and symptoms suggest that your daughter has developed anal fissures due to hard stool.
These anal fissures result in tearing of anal canal
from inside and cause the bleeding when stool is passed.
You must consult your pediatrician
or a pediatric surgeon for the exact cause of bleeding.
In 90% cases ,the cause is anal fissure although there may be other reasons ,which should be ruled out by consultation with the pediatric surgeon.