There are certainly times when it is morally necessary to resist one’s government. Thoreau wrote, “There will never be a really free and enlightened State until the State comes to recognize the individual as a higher and independent power, from which all its own power and authority are derived, and treats him accordingly.” Sometimes saying “No” is the best path to reaching that point of recognition.
That doesn’t work when one is the representative, elected or otherwise, of the government. In that situation, one is not acting as an individual whose higher and independent power should be recognized. Just the opposite, one should be recognizing that in others.
This, of course, is the situation of that county clerk in Kentucky, Kim Davis. By accepting a government position, she has an obligation to act in accordance with the government. The option is to quit.
The moral action in her position is just that, quit and accept the consequences. Staying, she becomes the oppressor. By resigning, she becomes part of the movement to remove oppression. Whether anyone agrees with her vision of oppression or not, all of us should be able to agree on that. Thoreau accepted being jailed but he would not be the jailor. By confining the actions of others, Davis is being the jailor.
She is using her own belief as an excuse for restricting others. That is not how it should work.
Thoreau, certainly, would not approve.