you can, just be sure to prime the pump, it must have water around the impeller to start, so a check valve beneath the pump, or putting the pump below the water level it is pumping from is a must.
Yes the ycan be used externally but they do not suck water so you need to drill the sump if you want it to be reliable. Most dual use submersible water pumps have internal passages or water jackets where the aquarium water circulates through the pump to keep it cool. Mags run hotter and use more power than most pumps to begin with as well as being louder though so you may want to consider a better pump like an Eheim, Ocean Runner, Octopus or Water Blaster.