It depends on the brand. Sometimes you can replace the pump but keep the motor, sometimes the other way around.

If you can find the crack then you could try sealing it with epoxy. There's a special pool repair epoxy that actually dries underwater! As long as the repair doesn't hit the basket or impede any openings it could well last for years.