Actually, they can. For as long as a state remains a member of the Republic it is bound to enforce federal law in the routine pursuance of its duties. No state agency may knowingly or deliberately refuse to acknowledge the authority of federal law. To wit, a citizen apprehended for a local crime must grant ICE access to determine citizenship and if found to be in the US illegally be taken into custody at the end of the state’s interest. Failure to do so is a violation of federal crimes against harboring fugitives.
That just begs the question: may the federal government gives orders to the States or State officials? For the third time since 1992, the Supreme Court has said "no." That doesn't mean any State may interfere with the federal government enforcing federal law. It simply means if the feds want the States to enforce federal law, they must get the States to consent to doing so.
The 10th Amendment protects the States from being drafted by the federal government into being federal agents. The United States is a federal republic and so the States must be able to exist, subject to the Supremacy Clause, independently of the federal government.