Mick is right that you can do this with OctoPrint and maybe other print managers, and 0scar is right that there's no way to get the printer to stop printing the no-longer-wanted part when printing without a print manager (since it doesn't know about objects). However there is a way to recover and keep the non-failed parts if you're willing to waste material printing the rest of the failed part. It involved having a recovery tool built in advance, though.
Basically, you need an adjustable-height platform you can temporarily glue to the bed where the failed part would have been, small enough not to interfere with other parts but large enough to cover at least most of the area the failed part should have been in. The surface of the platform needs to be something your material will adhere to, ideally the same material you're printing with.
With the print paused and the head parked to the side, glue the platform to the bed and adjust its height using the depth-measurement function of a caliper to match the current layer height. Alternatively, you could use a straight-edge resting on two adjacent printed parts to match the layer height, but that risks dislodging them.
After it's attached and adjusted properly, resume printing.
I have not tested this with tall parts, but I have successfully made such "platforms" with layers of blue tape for small parts, and see no reason the concept should not scale to arbitrary height as long as you can get sufficient adhesion and match the layer height sufficiently well. Designing a sufficiently adjustable and reusable one (with adjustment mechanism that doesn't interfere above the desired height) would be an interesting project.