Two-way pump motor

If it's a DC pump it may pump in the other direction with the DC polarity reversed. (I guess that depends on the insides of the pump; maybe even if the motor runs backwards, it might not pump?

BUT assuming it does work with the polarity reversed you can likely do that with code, provided you're connecting the motor via an h-bridge. If you currently have it connected via a simple transistor setup, that won't cater for reversal.

Please don't say you have the pump motor directly connected to 2 digital pins as its voltage supply. Hopefully you have a transistor or h-bridge in place, and the Arduino merely controls the electronics, and isn't trying to be a power supply.