You can do this with the Thunderbird the email program. I transferred a message from my Yahoo account to my gmail account and the reverse. To accomplish this with Thunderbird it is necessary to be able to configure both accounts and keep them up-to-date. After that, you choose one of the message(s) in the Gmail account account, click on the right and choose Move to, and then select the appropriate folder from Yahoo.
If you were in your position I'd likely create an additional folder at Yahoo to allow you to easily check that the messages were transferred. Once you have that information you'll be able to delete all messages on Google's servers.
Thunderbird is available for free, and comes with a variety of extensions that can enhance the functionality of. I'm not certain if any other email programs will be able to perform this, but they may, based on the type of email you're using.