The opening of the song is from a broadside ballad (from my broadside index):
There was an a bonny young Lad/ ZN2550| A new song of Moggies Jealousie: Or, Jockies Vindication/ Tune: You London Lads be merry; Or, woo't thou be wilfull still my Joe/ Entred according to Order/ P4 32 = DC2 158b = BDN 68: J. Deacon [See RB4 544 for MS verses. Entd. June 1, 1684, to J. Deacon. AI 1783]
The Douce collection copy can be see on the Bodley Ballads website, and an ABC of the tune for it ("You London Lads be merry") is B537 among the broadside ballad tunes on my website. There is a manuscript indication that "You London lads be merry" was originally a Scots song [not noted by Simpson, BBBM, where he notes copies of the song, which is not on any known broadside.]
The MS verses in Roxburge Ballads IV, p. 544, (given below) and the alternative tune indication, "Woo't thou be wifull still my Joe" seem to indicate that it is a slightly corrupted copy of the original Scots song, and "Moggie's Jealousy" was a broadside expansion of it.
Scotch Song [1679?]
Wilt thou be wulful stil,
and wilt thou be wulful stil;
Wilt thou be wulful stilll?
Shem for thy wulful will!
For the Lasse that I loued well,
was wooed against my will:
For the lass that I loued well,
was wooed against my will.
Jenny, gae hem to thy berns,
and sweeting, gae hem to thy berns,
An dearing, gae hem to thy berns,
and keep them a' from harms!
For the Lasse that I loued well,
was wooed against my will:
For the lass that I loued well,
was wooed against my will.
There was a bonny young lad,
that kept on a peckeny sheep;
He met with a bony young Lasse,
that wayed in the water so deep.
It came on aboue her knee,
"Ah!" she sed, "Bony young lad,
Wilt thoy [come] done the Tweed,
So [come alang] doon wth mee. [So lie thee down?]
.........................................These MS verses give no indication of where our cat came from.
A tune "Dole an' Woe fa' our Cat" is called for, but music not printed, in Henry Brooke's "Songs in Jack the Gyant Queller', 1749.
It looks like the MS text above and that from Herd (in DT) have verses from different songs, so there's no way to sort out what's what. "Tweedside" was one of the most popular of all tunes to be used in the 18th century ballad operas that printed the music, but the 'Tweed' in our song of the 17th century seems to me to be unlikely to be connected to it.