The ruling will allow Trump to revive a turn-back policy rescinded in 2021 under President Joe Biden.