While it is possible to create the required circuit with BJT's & construct a H-Bridge

The problem you have is the 3v3 volts you are planning on sourcing the machine from.
Each BJT will, roughly, drop 0.6V, so that is 1.2V taken away from being able to source the electrical machine, which means your top speed & torque will be reduced.
You haven't provided much information with respect to the type of electrical machine & only hinted at how you want to operate it.
A reasonable assumption is that it is a brushedDC machine and you simply want to change direction (not vary its speed)
You could try a DPDT relay
This way you will not have to sacrifice 37% of your available voltage