The ruling from the Southern District of New York found that the policy went beyond Secretary of State Marco Rubio’s legal authority.