Yes. The pins each have a 8 channel mux which allows 1 of 8 things to control the pin.
While there are many ways you might do this, the simplest would be to use Serial1.begin(baud), which causes both RX1 & TX1 to be controlled by the Serial1 hardware. Then later use pinMode() on either of the pins, which will reconfigure the mux for GPIO to control that pin. The serial port will continue functioning, even though from it's perspective one of the pins is no longer connected.