A federal court ruled that the Trump administration’s efforts to end the program are unlawful. The federal government is reviewing its legal options, including an appeal.