It was my understanding for years that the Sheriff was the highest elected official in a county. And as such, any Federal law enforcement activity in his county had to have his approval. Am I correct? Does anyone know?
Largely myth. The power of the office is defined by the states. Some states grant considerable authority to sheriffs, others much less.
In my state, Texas, the County Sheriff lives in mortal fear of the Texas Rangers who have statewide authority, and the commissioner’s court that holds the purse strings. Want to see a Texas sheriff sweat bullets, let the rangers drive up to inspect the jail, or catch him/her (Dallas county sheriff is female) waiting to testify before the commisioner’s court to beg for overtime money.
And as such, any Federal law enforcement activity in his county had to have his approval.
No one answer can fit all here. In some counties, the Sheriff is busy enough and doesn't need the distraction of worrying about Federal Agencies. Federal Agencies carry out law enforcement activities all the time without notifying a given County Sheriff. BUT, as chief law enforcement officer in the County, a Sheriff is within the law to demand that other law enforcement agencies have a search warrant if something about what they're doing is suspicious.
My belief also, is that if a Governor of a State has evidence of Federal malfeasance, he can withdraw the peace officer status of Federal officers in his State. You can see the problems with this though. If a search warrant is to be served, Deputy Sheriff's will have to serve it, thus dragging the local Sheriff's Department into cases in which they have no real interest.
Democrat Governors might revoke the peace officer status of Federal officers during a Republican administration, and Republican Governors might revoke the peace officer status of Federal officers of a Democrat Administration. Presently both sides generally leave well enough alone.