There are other questions here…you want the thing to move, stop, reverse, stop…but do you need it to STOP and turn off? or just reverse direction? You could achieve a back and forth motion with a rack and pinion assembly that wouldn’t require all the electronics. The mechanical assembly could even include a timed pause before the return action…and might be more up your alley for design work. But if you need the electronic control, the relay is definitely the way to go. As for the motor, shop the local flea market for a junker 12V power drill and rip the motor out. That should get you pretty close to your power needs. Even better would be if you could find a 12V cordless skillsaw. Usually, you can buy them at really low prices from flea markets, not so much from yard sales.
Another way to go would be to use a stepper motor, but the motor will be more expensive, the wiring more complex. The payoff is that the motor can tell your electronics exactly how far it moved, and you could build a control circuit to stop the motor whenever you want.