It's amazing how many people, on hearing a song, will say "your grandmother" (insert equivalent -and usually untraceable- older person) used to sing that"; often of songs written scarcely more recently than last week. I'm not saying that it's not true; just that it's no help unless we have details. Since Baez recorded the song in the early 1960s, there are plenty of grandmothers who may have learned it from that source, or from books. The structure suggests very stongly, in any case, that it's a composed song, and as such almost certain to have been circulated on printed sheets. That, however, is speculation which I can't back up.
If anybody can prove this one to be Irish (or Scottish, for that matter) and earlier than the late 19th century, they can bill me for two nights down the pub. They'll have earned it.