Yes it can be done. It will require several relays and switches. You may be better off buying a mechanically interlocked reversing contactor / motor starter.
It may be less expensive to buy an inexpensive 3 phase motor and a VFD by the time you purchase all of the necessary electrical components and the enclosure to put them in.