Unless you use a handshake approach, you will not be able to know when data is going one direction versus the other, and would have collisions.
Single-wire implementations of UART tend to need to rigidly define a query-to-response format for sending/receiving data in order to prevent both devices trying to drive the wire at the same time.
Useful information similar to what you want to achieve: Using a UART to Implement a 1-Wire Bus Master - Tutorial - Maxim
Depending on your design requirements, you merely setup the device to be in Master, send the data, switch to slave, read for a period, and then switch back to master upon a receive or timeout.
The pin drive modes are very important for the signaling to work and should be chosen for carefully considering both devices connected together through the wire.