I think there's a few different issues here that need to be picked apart:
Player ignorance: in modern America mouthing off to a cop is dumb, but in Medieval times an important noble could mouth off to some watchmen with impunity. Often the best way to model this ignorance is to have the character be just as ignorant as the player by making sure that players who aren't going to bother reading up on the local culture are RPing foreigners.
Alignment issues: saying "the church of X says you should kill members of the church of Y" is one thing, saying that you can kill unarmed members of the church of Y and be Lawful Good is another since it appears that the DM is approving aspects of in-setting morality. The DM needs to clearly explain what alignment means in the setting or not use it (or at least not use it for normal PCs).
Differences in morality in the party: if some players buy into the local morality and others find it repellent that's an issue and should be handled like any other kind of disagreement in the party, the DM shouldn't be seen to take one side or the other in play, but could make some ground rules before play starts.
Once those different streams get crossed, things can get messy.
The first is part player ignorance bringing modern day things like mouthing off to a cop today gets you in nothing but trouble and add metagaming from 30 years of playing the game. A lot of DM use a more modern feel to the game so mouthing off to the local guard is bad.
It is hard sometimes to overcome 30 years of game experience no matter how much you try you will never be the same as when you fist started and your first level character has all the benefits of your table experience.
I think the DM needs to very clear on all of this and be consistent and be willing to stop the game if needed and explain things. On thd other hand the players need to trust the DM and listen and more importantly accept even if they don't agree this is how this works in this world. When you run your game you can do it your way.
I think that ground rules are important. One way I try and avoid stuff like this in my games is right up front I tell people that I don't tolerate anyone jumping on or telling someone else how to play or design their character.
I try and remind people to keep it in the game and keep it in character. The difference between myself and Broken Druid is she is more of a peacekeeper and she hates confrontation. So she tries to avoid it and she will keep trying to fix things.
If this was happening in my game I would have already put an end to this by basically saying you played your characters she played hers I have no issue with how she played it. Get over it and move on or we can just not play.
It is very simple your DM controls the world and the NPCs and how things work you control your character and how your character reacts to the world and the other players. It is one thing to ask a question but once the DM has made a ruling sit down shut up and play the game.