I would see a doctor because it's likely they'll prescribe a mild stool softener to help it heal - I think you can use a small dose of fybogel but it does say "use on medical advice only" for children under the age of 6.
Mind you if you can't see it and it's no longer hurting her, it might have healed?
lots of toddlers get something called constipation with overflow, where there's compacted poo in the rectum and runny stuff that sometimes leaks out. obviously trying to pass the hard bit could tear. I'd definitely see your GP who may refer you to a paediatrician.
I had an anal tear (from a 40 mile per hour enema aka banana boating!), and wasn't prescribed anything other than a local anaesthetic gel to use when I needed a poo. Not sure it would work on a baby as you don't know when they're going to do a poo.