The Entertainer and the Dybbuk by Sid Fleischman involves a ghost of a Holocaust victim aiding a young GI in his ventriloquism act in an effort to get to the Nazi officer responsible. Here's part of a review:
World War II is over and Freddie, a young ex-soldier, is trying to make his living as a ventriloquist. The only problem is that he isn't that good at throwing his voice without moving his lips. This situation is quickly solved when he suddenly finds himself possessed by a Dybbuk, a young Jewish ghost named Avrom Amos who was killed by an SS officer during the war. Avrom wants revenge on those who killed him. He also wants people to remember the terrible fate that came to the millions of Jewish children just like him. And who better to use than a man who stands up on stage in front of crowd with a dummy to speak for him?
The part you're remembering is two chapters from the end:
"Almost, yes. Have you looked in a mirror lately, Professor? I see you are now talking without moving the lips."
The last sentences are actually:
"Mazel tov, pal," Freddie said. "L'chaim!"
He didn't move his lips.