There are no records for an Andrew Dougherty or variants in Mayo for the timeframe you have outlined.
I could not find a Dougherty/Ferrie marriage or any variants.
You are correct to be cautious about records that have nothing to back them up. Who knows, maybe in the future the person managing the Ancestry tree you found may get in touch with you.
The marriage record is likely to be correct in naming Andrew as the father, the information should have come from the groom himself so it is probably true.
The only birth record I found for an Andrew Dougherty with father Andrew was on Roots Ireland (subscription site)
Name: Andrew Doherty
DOB: 6 June 1842
Parish: Carabane, Co. Galway
Father: Andrew Doherty
Mother: Margaret Murphy
Denomination: Roman Catholic
Sponsors: John Larkin, Margaret Canny
Galway is the county next door to Mayo but this parish is quite a way from the border. However if the family story is true about them travelling around Ireland, it could be a possibility. You should treat it as a hint.
You can search the parish registers for Carabane here. Maybe you will find something else of interest.
I could not locate the family in the 1881 or 1891 census. What spelling was Andrew using?