Is there a simple way to hack a bicycle so it moves back and forth based on pedaling back and forth? Can we make changes in flywheel so that cycle can move back upon pedaling back?
That is possible, track bicycles are designed to work like that, that's called a fixed gear drive train. It depends on the style of free wheel already installed on your bike. The free wheel is the mechanism on the rear wheel that engages when you pedal forward and disengages when you pedal backward. You will likely need to remove your free wheel and install a cog and lock ring, or replace the wheel with one that can be set up with a fixed gear. You will not be able to use a rear derailleur without a free wheel. When i was a kid in the early eighties I converted all my bikes to fixies.