I wouldn't have told her she was naughty.
She was openly expressing her thoughts and opinion, which is a skill she will need to keep as she gets older.
Yes, it was rude, and if it were my child that had said that, I would have said something like "if you think it is a mess, maybe you could tidy it up for me"
If it was someone else's child (as in your situ) I'd have probably just ignored it.
A friend of mine sometimes collects my ds's from school and one day when I went to pick them up, ds1 said (infront of both me and my friend) "it's really messy here mummy, it's not like at home"
Me "well, yes, you've all pulled all the toys out and made a bit of a mess"
Ds1 "no mum, not the toys, theres all food all over the floor" (my friend is known to not really clean up after lunch etc)
Me (trying to be diplomatic without oppressing ds's views) "yes, there is a bit of dog food on the kitchen floor isn't there, but that's because the dog dropped her food, that's ok. Cat does it at home near his bowl too. Now hurry up with those shoes please"
Ds1 "there are biscuits all trodden in on the floor mummy, I don't think X(my friend) has been doing any housework"
Me "Well maybe she's had a busy day. Let's go"
I was mortified, but my ds1 wasn't being naughty, he was expressing what he saw which is fine. It may not be acceptable socially but I certainly wasn't going to tell him off.
On the way home I told him that what he said could have hurt X's feelings, and that our house is tidy because we are all at school all day so no one plays there.