I assume from your information that James Stewart didn’t accompany his wife and that was perhaps because he had died. I looked for deaths around Dungannon in the 1870s and found 2 that might fit. Both were married and had wives that survived them. Both were farmers:
https://civilrecords.irishgenealogy.ie/churchrecords/images/deaths_returns/deaths_1871/020760/7283073.pdf
https://civilrecords.irishgenealogy.ie/churchrecords/images/deaths_returns/deaths_1877/020551/7211730.pdf
I looked for a marriage for James & Ann. Statutory marriage registration started in April 1845. I do not see a marriage in those records so suspect they married before 1845. In which case you need church records, where they still exist. (And they may not be on-line).
Dungannon is in the parish of Drumglass. There are 2 Presbyterian churches in the town. 1st Dungannon has records from 1790 onwards. There’s a copy held in PRONI in Belfast. I don’t think they are on-line anywhere. 2nd Dungannon has baptisms from 1830 and marriages from 1825. The only copy is still held by the church so you would need to contact the Minister to access them.
Tradition was to marry in the bride’s church, so marriage and children's baptisms are not always in the same church. In addition to the 2 Presbyterian churches mentioned above the Church of Ireland has records from 1665 onwards, with a few gaps. Copy held in PRONI.
Presbyterians in Ireland don’t use the parish system so living in Dungannon didn’t necessarily mean you went to church there, though it’s fairly likely, but sometimes folk attended church a bit further away. Something to bear in mind if you don’t find the family in the records mentioned.