This is a Scottish pipe jig. A bagpipe setting can be found in John MacFadyen’s first collection.
As such I set it as A Mixolydian but there’s no ‘C’ in the tune so it could be A Dorian too.
I set the first beat of the B part as ‘aga’ to give some leeway. The pipe setting embellishes that with a grip between the A (like a very quick cran) that would look like a(3G/d/G/a. The higher G might be easier for other instruments.
This is in fact the way it was in the original 2-part version published in the Cowal Collection, so your instinct is sound.
My instinct is that the 2 additional parts don’t quite do what they are trying to do - there’s some funky syncopation, but the structure is very loosely followed and it gets a bit aimless, especially in the 4th strain.