On her marriage certificate to Robert Thomson it states that she was born in Drumore Lochrutton and registered in Kirkpatrick Durham, so it seems that Margaret was born in Drumore Lochrutton and her birth registered at Kirkpatrick Durham. It would appear that Margaret’s birth could fall into the Registers of Neglected Entries category, along with her brothers and sisters. but I cannot find any evidence of her father James McGuffog being in Drumore Lochrutton any hints where I might be able to look this was before the census records.
You don't say which faith or form of worship the family followed.
The online OPR's at Scotlands People are those held by the Church of Scotland although entry in them does not guarantee with 100% certainty that the family were of that Church. The ministers in each parish were instructed at different times to record the details of all in their parish - some did this and some did not.
There were a number of schisms within the Church of Scotland over Church Doctrine which resulted in a number of congregations leaving (the main breach came in 1843) and the records of these "dissenting" churches are not online.
Another Church is the Episcopalian Church (the Scottish offshoot of the Church of England) given the family connections to England that you refer to in your older post. Unfortunately again these records are not available online
With regard to the RNE this was introduced just after the introduction of Civil registration and its primary purpose is to record those births missed from OPR's between 1801 and 1854 - the problem there is that the entries were only created if for some reason the person required official written proof of their birth.
As to Margarets birth being in one place and also recorded in another - it's possible that she may have returned to her parents to have the children while her husband remained at their home address.
Unfortunately the answers to this particular brick wall are not yet available online and will require various searches of
1. the Kirk Session records for the different parishes to see if there was any record involving them.
2. If they owned or sold land the Sasine records may hold further information
3. as might the Retours of Heirs if they inherited land.