Best way to control the direction of motors

Yes it is possible. Look up the h bridge circuit