Looks like the question has been answered, but I note that essentially the same song - in a slightly ruder version - is sometimes called "Ballochy Bill the Sailor."
Lyrics under the latter title appear, e.g. in "A Book of Vulgar Verse," by 'A Gentleman About Town' published by Checkerbooks in 1981.
John