The answer is no.
Particularly relevant is Article VI, Clause 3 of the United States Constitution:
The Senators and Representatives before mentioned, and the Members of
the several State Legislatures, and all executive and judicial
Officers, both of the United States and of the several States, shall
be bound by Oath or Affirmation, to support this Constitution; but no
religious Test shall ever be required as a Qualification to any Office
or public Trust under the United States.
Note that this applies to state as well as federal officials, and that in this context within the U.S. Constitution, the term "state" means "state and local" (although not necessarily tribal government) officials.
Arguably, state officials with a legislative role who are not members of the state legislature aren't covered, but this does not reflect common practice and this hole is often filled by a state constitutional provision or a state law or a local government charter. Likewise, tribal constitutions, tribal laws and federal laws often fill the gap in the case of tribal officials.
The oath of members of the U.S. military is in accord with this principle. Even lawyers, since they are, in principle, officers of the court as well as members of a private profession, swear or affirm this statement.
A recent thread in the law section of stack exchange is also relevant and spells out the ideas of the qualified and absolute immunity of officials acting to carry out an unconstitutional order from a superior.
The upshot of that thread is a small number officials (mostly the President, legislators, judges and district attorneys) have absolutely immunity from civil or criminal liability for certain kinds of discretionary official acts. (No public officials in the U.S., even the President, have immunity for unofficial acts in violation of the law.)
But, most executive branch officials have, at most, "qualified immunity". This means that they are only subject to personal liability for money damages in cases where the meaning of the law with respect to the situation in question is "clearly established" which usually means that it involves a legal issue that has been resolved in a binding case law precedent. In cases where the law is not "clearly established" a subordinate may generally defer to his superior's interpretation of the law and the constitution without fear of civil liability in money damages to someone harmed as a result.