My son was later being toilet trained, 3.5 years old. He simply wasn't ready before. At this age it only took him a week to grasp the concept, bypassed the potty and went onto a toilet, with only 1 mishap at preschool.
I'm assuming that your daughter is in Reception? I'll be blunt, unless your child has SEN or a physical disability, then there's zero excuse why your daughter is still in nappies/pull-ups. You are doing your daughter disservice by allowing this situation to continue. School staff shouldn't be having to change your daughter, because you've not prioritised toilet training.
Over half-term, stay in, and get to grips with toilet training. I did this with my son over the May holiday, when he was 3.5 years old (he's an October baby, so didn't start school for another year). At her age, she should pick it up fairly quickly.
As for your friend, she shouldn't have made the comment in ear shot of your daughter. It's not your daughter's fault she isn't dry, it's yours. Don't ever change your daughter in front of other people. She's 4 years old, not a baby, and should be changed in the bathroom, and given dignity and privacy.
If you think there's something wrong, and you've tried toilet training but your daughter isn't understanding, then seek professional help from your GP surgery. You can't leave this, because sooner rather than later, other children will notice your daughter is in pull-ups, and she'll be singled out by the other children and asked why.