Not exactly. The judicial system is the proper and lawful venue for challenging federal laws that might run afoul of the powers delegated to the federal government in the US Constitution. If any sheriff could just hypothetically disagree and nullify a a federal law in their county then you would have hundreds and hundreds of different interpretations which would lead to mass confusion and instability. A sheriff just like any other regular civilian is subject to obey federal laws. Even the state governor has to obey federal law.
When FedGov is lawless, I'm okay with refusing to obey an unlawful order. That would have been the correct response when I was in the military, and it is the correct response to an unlawful order from the IRS.