You write, "If my daughter won't listen to me, I have no idea how to fix it."
That's giving up on your responsibility, to be honest. You have kept out of their little spats and that was wise so far -- "Work it out yourselves" is usually the way to go -- but it sounds beyond that now. Whether your daughter won't listen and doesn't want to be kept away from M does not matter; you control your child's time and where she goes and what she does. She doesn't control it.
You have already had them separated on the bus and at school. You can't control extracurricular events at school other than by being present yourself, so if your child goes, you go the next time to ensure that M doesn't lay hands on your daughter again. (I'm assuming that since your daughter told you what happened at the other event where she was bruised, you weren't there so she was relating it to you.)
Find other things for your child to be doing to get her out of M's orbit. Get her other outlets and activities, whether it's Girl Scouts or an after-school club or something at the local library or a sport or dance or art, whatever; doing other things and finding other friends outside the neighborhood will make M seem so much less interesting. If your child is going to a third kid's house to play, call the parents who will be present and ask them if M will be there and find something else your daughter must do if M's going to be around; then invite that third child over to your house another time for a one on one play date.
This will blow over but meanwhile give your girl tools for dealing better with M when they do encounter each other, and they will. M. got just what she wanted when your little girl hit back -- that's the attention M is seeking, so role-play similar situations with your daughter so she will react differently next time, preferably walking away and getting near adults so M won't pursue her.