Providing external voltage to a motor connected to arduino
Easiest way is looking at a motor driver board like this DRV8835 driver from Pololu. Then you can connect your 9V source to the VIN pin, your arduino (via a resistor - 10k) to the EN/PH pins and a 3.3V or 5V supply from the Arduino to VCC, ground it, put 2 10nF caps between VIN and GND and VCC and GND and go.

Alternatively, you can use a transistor or a relay to do the same.