Safe? ... No.
Doable ... Yes.

You can set TRIS for a pin to output when that pin is in analog mode.
But even though you only want to use that pin for output, it's the reading of the pin that's a problem.

When a pin is in Analog mode, it always reads a Digital 0.
And anytime you write to any of the other pins on the same PORT, the CPU does a Read-Modify-Write of the whole PORT.
So it reads the output pin as 0, and writes that value back to the pin, regardless of what the original state was.

So essentially, you can use THAT Pin for digital output, but then you can't use any of the other pins on that PORT for digital output.
Digital input or analog is fine on the other pins.
<br>