All authority comes from God.
When authority begins to be used against God's cause (to foster sin, error, heresy, etc.) then it MUST be opposed, under pain of sin.
There is an obedience that is gravely sinful.
When a Catholic priest went along with Vatican II, assuming he had ANY qualms of conscience doing so, he sinned mortally by forbidding parishioners to kneel for communion, allowing altar girls to serve in the sanctuary, etc. Any cooperation he had in the destruction of the Church and the Faith of his congregation he will have to answer to God for -- even if he was "just following orders". That won't get you off the hook at the Judgement Seat.
If your father or mother told you to commit a sin, you cannot obey.
If the government ordered you to only have 2 children (and then to contracept/abort after that), you would have to rebel.
That doesn't mean we must become vigilantes and commit various crimes (murder, arson) in the cause of "justice". We must allow protestant churches to stand un-burnt for the sake of the common good, especially since protestants make up such a large part of the population in America. But ideally, in a Catholic country, heresy would be kept in check and opposed by the government itself.