Studio, multitrack, voice recordings have been getting pitch corrected for some years now. But it can also be done to non-multitrack, even live recordings done straight to stereo, without affecting the accompaniment. I know, I invented the technique! The same trick can be used to correct wrong notes - as it happens it's harder with recordings of piano than other instruments but it can still be done. Oh, and I can correct out-of-tune notes on piano recordings too.....
Hey Richard,
If the accompaniment and the voice are in different octaves then it is no problem. If you can tell me you can separate them when in the same range (esp. in unison)--kudos to you and I can congratulate you with invention

.
Also, usually, piano gets out of tune in a top range when some strings in a note get out of beat. If you want to say you can correct that and synchronyze them all, I will be more than happy to come and learn the technique as your apprentice.
On the other hand, if it is live and something got messed up in exposition and the only another similar part is in recap but in another key, then there is no problem to fix it.
If there are three repeated chords on a bass background "hanging over" and only the last chord sounded clearly, there is no problem to insert two others, etc. etc. etc...
Moreover, if anything else fails, but the recording has to be issued clean, there is no problem to spend some time and match the sound from a different recording. The match will include general tonal balance, timbre of instument, presise channel gain, ambience, hall noise, its spectrum, etc.
Best, M