In general, yes, but let’s make a distinction between those laws that compel a Church to do something and those that compel a
person - priest, religious, or laity - to do something. The long answer follows, but the short answer is “yes, unless there’s sufficient reason not to,” We have a duty not to follow immoral laws - many of which would likely be struck down by our Courts, at least so we hope.
The government can compel the Church to file the appropriate forms for continuing 501(c)(3) status, as it should. This is orderly and contributes to the rule of law, and doesn’t place an undue burden on or interfere with the management of the parish or diocese. The government can also compel the Church to comply with criminal investigations, ie by turning over evidence of, say, fraud or abuse by an employee. This is also entirely reasonable. However there are laws that the Church should oppose.
One example of a bill aimed at the Church was Connecticut Raised Bill No 1098 (
en.wikipedia.org/wiki/Connecticut_Raised_Bill_1098 - sorry, it’s a decent summary) which would have compelled reorganization of the dioceses in Connecticut so that elected laity, not the bishop, would have final financial oversight. The Church fought the bill by lobbying and rallying the faithful, and the bill was ultimately tabled.
A more recent example comes from the case of a gay couple in the UK who are suing to have the Church of England perform their marriage (which is now considered a legal right in the UK). In this instance, the CoE would be compelled to pronounce something it has publicly professed not to recognize, that is a sacramental union between two men. The case is a little more prickly in the UK, where the CoE is a State Church that receives tax revenues, while in the US and elsewhere, the Catholic Church is a distinct entity. When such a case comes up in the US (as it no doubt will), the decision will be on whether the government has a compelling interest in effectively telling a Church what it can and cannot profess in terms of moral theology. That’s a rather astonishing question - what is the purpose of an institution defined by organized belief if it is not free to maintain or amend its own beliefs?
As for laws regarding individuals, this is a little more difficult because an individual’s right to self-determination or privacy stems from a different origin than an organization’s right to self-determination. An individual is held to have God-given rights, and created in a state in which the government must first and foremost make the case for interference; it isn’t - and should never be - a case of “if you’re not doing anything wrong, you don’t mind if we take a look” but rather “show me the warrant, the probable cause, the signature of the impartial judge, then I’ll let you in.”
Government can compel a Church to turn over documents, but an individual may invoke the right against self-incrimination (Fifth Amendment). Government can likewise seize assets of an institution suspected of laundering funds, while an individual reserves at least some assets that may not be seized so easily.
Consider the legal standard in Denmark, which also has a State Church. The State Church must perform gay marriages - however individual priests may decline to perform the marriage on the grounds they oppose gay marriage, provided that the Bishop finds a priest willing to perform the marriage. I’d assume there are a number of them, otherwise I don’t think the law would have passed.
In the US, a gay couple would have better success arguing that a parish must allow the couple to hold their wedding on property owned by the parish, than they would arguing the parish priest has a legal obligation to perform a sacramental marriage for the couple.
I’m trying to think of an instance in which the religious life of the individual would be directly imperiled by the government, but the possibility strikes me as too remote and any examples that come up cross into the ridiculous, notions that would never be accepted for long enough to be any threat.