Actually, a sheriff is the highest Constitutional officer in the law enforcement chain. Feds/state can do nothing if the Sheriff wants to stop them.
She was in a Federal Courthouse to answer before a Federal Judge. Under orders from that Federal Judge she was taken into custody by US Marshals, within that Federal Courthouse, who have on-site jurisdiction.
The ONLY way for the Sheriff to have intervened on her behalf would have been to storm that Federal Courthouse and removed her from the custody of the US Marshals at gunpoint.
How do you think that would have worked out?
That is a myth.