I probably would have said something right then. I mean, you already asked about the sweatshirt.
I might have said, "Oh good...it turned up....hey wait....why is the other girl's name in it now?"
That would have opened a discussion with the teacher who could then have a discussion with the other girl's parents.
I understand sharing a cubby, but personally, I NEVER allowed my kids to share jackets, sweaters, hats, hair brushes or hair pretties. That is the first line of defense when it comes to preventing the spread of lice. My kids' schools didn't allow such sharing. They might have had an extra jacket or sweater in the class if a child fell down and got wet, whatever....the child could either keep it or give it back to the teacher to take home and wash. Children were never expected to share each other's personal clothing.
In fact, my son's school had a "clothes closet". It was full of donated clothing, some of it brand new, for kids that had potty accidents, spilled milk all over themselves at lunch, fell and got muddy....didn't have a coat, period.
They were all clean and never expected to be returned.
To me, the school should have something like that or encourage parents to have an extra instead of loaning out someone else's things.
You can choose to point out to the teacher what happened and let it go from there, but you can also make a point of letting her know that your child is not to share clothing with other kids. It's not about being selfish.
My kids schools every year, at the beginning of the year, sent home fliers advising children NOT so share personal items. It doesn't matter how expensive a school is, kids can get lice and not sharing things like that can help keep it contained.
I understand a parent thinking that the school gave the other girl the sweatshirt, but I personally would have asked and confirmed that before changing the name. It had obviously started out as someone else's.
Best wishes.