Hi Mary. If you are looking for the family to which a Neilson family, living in Annandale in the 18th Century owed their allegiance to it was likely the Johnstones. I doubt a Stewart link, certainly not from that district. I have attached two maps, broadly of the period.
1. Districts of Scotland c. 1732. This shows Annandale (in the south of the map), alongside Nithsdale (to the west) and Lidesdale (to the east). Annandale was, famously, Bruce lands but absorbed to the Crown during the period of the Bruce Kings but held by the Johnstones during the 18th century.
2. More detailed map of Annandale c. 1732. This shows the district in more detail but it shows the towns and castles.
Here is a link to the history of the Johnstones of Annandale vol1 and vol 2. Vol 1 has the Charters and discusses the land holdings. You can cross reference the map above with the text and see which family of Johnstone held which castle during the period. I have done a quick check for you and could not find any family of Neilson holding land to the Johnstones. This is a link to the Parishes of Dumfriesshire.
I did a quick search in the district for Neilson. There was a family of Robert Neilson and Elizabeth Mein, married in Annan (the town - Parish 1 on the Parish map), early 18th C. They seem to have had a family where more than a couple lived to childhood. They may have been from the Neilson (noticed as Neilsoun) of Dumfries (they seem to have been merchants). Here is a link to the Old Parish Records.
As far as a Clan is concerned. At that time, to be historically accurate, they would not have been part of any "Clan". These people pre-date the Uprising and the then later creation of the Lowland families into "Clans" in the 19th Century. However for association, you could link the profiles to MacNeil.