Thank you for your query
You should consult a pediatric surgeon. The symptoms seems more likely due to a fissure or crack near her anus. Constipation
is most commonly dietary. Try giving her lots of fluids, vegetables and fruits. Avoid things with refined flour or junk food. Add additional sugar in her milk. Little bit of honey everyday also helps. Give her Sitz bath 3-4 times a day (make her sit in mild warm water for 10-15 min). Apply an ointment like SMUTH in her anal region. Stool softeners may also be required.
Hope that helps
God bless you