Well.... sort of.
The M2 pump's are the same (similar)... but they run different adapters, and gear ratio's for the different engines. Also... I think there was an update to the 3.0l main housing, for more cooling water.
So... if you take the pump you have now... and replace the pinion and drive gear... that will get you the proper raito, and input splines. AND... if you buy the proper adaptor... that will let you mount the engine.
But the "Unkowns" are:
1) Since the ratio is different... I don't know if there is enough movement in the case to properly set the lash of that gear set. This is the same issue with changing gears in a truck axle. You can have a "Ford 9 inch" rear end... but the carrier will change, depending on the ratio.
2) Since the 3.0l engine uses rev 5 of the M2 housing... I'm not sure if there is enough flow in the case.
So... you can try it... but you would probably be better off, selling the 240 pump, and finding the proper 250 pump.
With all that said... if you want to swap another 2.5l engine... it's going to work, regardless of the gear ratio. (it just may not be optimized)