Bermuda: Could you be misremembering, and the song you're seeking is the old Carter Family song called "You've Been a Friend to Me?" The last lines of its refrain are "If ever I have had a friend, you've been that friend to me." Sounds suspiciously like the one you're quoting above.
Sandy