There's plenty of precedent for a Sheriff to deny permission to Fed. Agents to operate inside his county.
See. Castenada vs the United States

Sheriff's need to understand their legal authority and start using it to protect the citizens that elected them from violations if their constitutional rights.