So you are proposing a derivative work based on another works main lyrical stanza and using the music from that work. You need a license from the composer, which is done through the publisher. So you find the publisher and work a license to the music. ASCAP has the leading database from which to find publishers, called ACE and here is the link https://www.ascap.com/Home/ace-title-search/index.aspx In your example, you would find than one a couple of nobodies name John Winston Lennon and James Paul McCartney wrote the song and the Publisher is Northern Songs, Ltd. So Northern is who you would contact. It is clearly possible as ACE shows a half dozen other Yellow Submarine songs. Seems in your example you would not be the first to do the sort of thing you propose. You will want to employ the services of a good music lawyer for this. I would suggest you go to the Find A Lawyer tab here on Avvo and in the search window type Pamela Koslyn and then call her. She is located in Beverly, Hills that is. . . movie stars, fancy cars, . . .Good Luck.
I am not your lawyer and you are not my client. Free advice here is without recourse and any reliance thereupon is at your sole risk. This is done without compensation as a free public service. I am licensed in IL, MO, TX and I am a Reg. Pat. Atty. so advice in any other jurisdiction is strictly general advice and should be confirmed with an attorney licensed in that jurisdiction.
I am not sampling. - yes you are, you are sampling lyrics from the composition.
All music will be original. - no, the lyrics are sampled from someone's composition.
Get a license from the original composer if you do not want to be sued. Consult with an attorney on your area on how to do that.
There are two (2) separate copyrights when dealing with music recordings. One is in the actual sound recording and the other copyright is in the musical composition. You secure these copyrights through master use licenses (sound recordings) and mechanical licenses (musical compositions). If you are not using any of the original sound recording, then you will not likely need a master use license. However, you will be sampling/copying original lyrics from the musical composition, and that is an infringement without permission or a valid defense. You probably have seen TV commercials where a company uses a house band or some unknown band to perform a well-known, popular song. In those instances, the company does not have to secure a master license to the original song, but it will require a mechanical license from the composition owners in order to have its hired band to perform the song. You can get a mechanical license directly from the copyright owner or from a company like the Harry Fox Agency (see attached link). Music law is a minefield full of potential hazards, so I would speak with an experienced music attorney before proceeding.
The foregoing response is provided for general informational purposes only and is not a solicitation for business. Please retain an attorney if you need specific legal advice. No attorney-client relationship is established until both you and me agree to establish one, and neither transmission of information herein, nor the receipt of such information, constitutes an agreement to establish an attorney-client relationship.