This reminds me of an incident from my childhood. I was in elementary school, so maybe 8 years old. In addition to the hot lunch the school provided peanut butter sandwiches for kids to eat at lunch time, all stacked up in a bin. I went up to get one and was picking through them. Another kid my age came up to me and yelled, "You touch it, you take it!" Now, he was absolutely correct that I shouldn't be touching all the (unwrapped) sandwiches. I don't think that negates him yelling at me in a curt tone, though, so I think we were both in the wrong. I remember telling my mom about it later and we had a good discussion about how the way you say something can be as important as the message you convey--that you can be "in the right" but also rude (obviously in much simpler terms).
So maybe that would be a good starting point for the OP's daughter. Probably, the boy was wrong to cut in line, and her daughter was right to assert herself (as we would do with an adult who cut in line). But the tone and words she used might have been overly hostile, and maybe they could talk about other ways to handle that part of it. I think she did well in telling the other girl to stop and in not escalating that part, so I would praise her for that.
I would also talk through other possibilities--I guess I don't know how many other facets kids that age can handle, but it might be good to think about things like, did it look like this kid had a legitimate need to go first? Was he joining his sister (the hostile girl?) who happened to be at the front already, and if so, does that really constitute cutting in line? I would ask, do you think she really meant to spit on you, or did it just happen by accident? Maybe these aren't questions that are possible to answer, but I think it's important to think about them--kids often have trouble seeing other POVs and imagining that things are different from what they first supposed. I think of an angry guy who shouts that someone "shoved" him when they just accidentally brushed him--that's a guy who has not learned to de-escalate situations, you know? So the whole thing might make a good teaching moment.
I would probably only call the school if the incident was part of a pattern, or involved physical violence like shoving.