To release a song containing a sample you must be granted permission from rights holders that own the music composition as well as the rights holders that own the sound recording.
Sampling is when you use the actual recording of another artist's performance. For example, if you use the 1971 recording of Led Zeppelin's "When The Levee Breaks" as your drum track. That's generally not legal, unless you have permission from the original artist or owner of the copyright, (usually the music publishers) and the owners of the recording (usually the record label).
If you use a piece of someone else's composition (e.g. a lyric, chord, guitar riff etc.) to include in your song, but rather than using that piece of the original recording you re-record the lyric or chord, guitar riff etc, then you have used an interpolation rather than a sample.
While you would not need the permission of the owner of the original sound recording (because you didn't use the recording), you would still need the permission from the owner of the original composition. A mechanical license will not cover this use, instead you will need to negotiate directly with the owners/rights holders.