Your daughter has a kind heart, and that is a good thing.
I had a similar experience as a child. The word "frenemy" didn't exist at the time, but if it had, it would have described my neighbor J. J. and I went to the same school and were in the same grade. During the summer, J. liked being my friend and we had a lot of fun together. During the school year, J. was a mean girl. After a few years of having her be nice and then mean to me, I had had enough and stopped playing with her and went my own way.
My mom didn't have to intervene, I came to recognize for myself who was my true friend, and who was not.