driver for 9v motor

If the motor is to turn in either direction, you need a motor driver capable of handling the maximum current and motor power supply voltage.

If the motor is to turn in only one direction, a logic level MOSFET and a kickback diode across the motor terminals will do the job.