He can ask the facility where he's being held if they would permit him to marry.
We know nothing about his situation, so we have no way of knowing if he would qualify to change his status if his removal is canceled. He should consult an immigration lawyer.

