Yes, you can travel on an online RAC ticket by train. You will be allotted a side lower berth during the journey only for seating, and half the seat will be shared by the other passenger having a RAC ticket.