A student who was arrested as part of a Trump administration crackdown on pro-Palestinian protesters can't be deported without a court order, a US judge says.