Hi hgs46 and welcome to Rootschat.
I too have Brechin ancestors, but unfortunately none, found so far, named Charles.
It might be better for you to start a separate topic on your own subject as it is more likely to get new views and help on your query specifically.
I see on IGI that there are three possible births for Charles, (but only one of them came up on Scotlandspeople for some reason, and no matching marriage for Charles and Ann that I could find)
Charles Brechin, birth: 18 Jun 1771 — GLASGOW, LANARK, parents: John Brechin, Jean Young
Charles Brechin: christening: 12 Jan 1772 — BAIRNIE-TILLYDESK EPISC, ELLON, ABERDEEN, parents: George Brechin
Charls Brichin, christening: 1772 — TARVES, ABERDEEN, parents: George Brichin
There is nothing to say that Charles was from Aberdeenshire, but given that both the children you know of married in Aberdeen, and likely his wife Ann died in Aberdeen it is a possibility, or perhaps after being stationed in England and then Ireland in the Army his last posting was Aberdeen.
If I were you I'd try and see if there is a way of finding out more on Charles military career perhaps through posting on the military board here, or the National Archives and a distant cousin found out a lot about an ancestor's military career through findmypast.com.
If you start a new topic on this board please tell more on what details you already have on his marriage, and the births of his sons.
Good luck and please let us know how you get on,
Grothenwell