It’s impossible to play voicemail from your phone company voicemail service while talking on the phone because it needs to call the service. That can't be done unless you press the flash button to put the present caller on hold and then make another call.
With that said, it could be possible that you might be pushing the phone into your face while talking and your cheek is pressing the flash button and redial button (assuming the last call was to check for messages).
You did say your issue was with voicemail, but the same thing could make the phone's answering machine start playing by pressing keys with your cheek. That might be even easier to do if you tend to press the phone into your face.