As far as the story goes...
I have no issues with foreign language classes teaching a bit of the culture of the languages origin. It helps better understand the context of how language works there in part. That said, I'd hope the class in question was focusing on far more examples of Spanish speaking countries...perhaps, I don't know, SPAIN...rather than JUST mexico.
If the student really had a huge issue with reciting the mexican pledge then I think a reasonable teacher would simply offer up something different. Perhaps recite a portion of the Mexican national anthem (if it had words) which would be less problematic to the students morals perhaps than pledging "allegiance" to another country. Or if that didn't work perhaps a segment of a speech by a famous mexican politician. Something along those lines.
Outright giving the kid a zero for not wanting to do something for a moral reason is hardly good teaching, does nothing for the kid, and is just lazy. If the teachers desire is to actually TEACH there's definite ways that can still be done. And if the kid refuses them all, then its obvious that its not an issue of having a principled issue with the work but simply that kid being a lazy ass trying to get out of work.