In common with my surname, your ancestors name included the first two components Mac and Gille. Together, these are usually rendered in English as MacGille or MacIlle, and mean "Son of the Lad" - the next part of the name will be in the genitive form in Gaelic which is where the "of" comes from. Hence, "Mac" in MacDonald technically only means son, but in the context of the anglicised version of the name, it effectively means "Son of" when it refers to anglicised surname. Similar, "MacGille" or "MacIlle" means "Son of the Lad of (the)".
In your particular case, Huaish might be a little tricky because it is dependent on how aware the census officer was of the Gaelic language, they've either written in phonetically from an English perspective or with some elements of Gaelic spelling included. Also, unlike "Mac" surnnames, "MacGille/MacIlle" names are as likely to be followed by either (i) an adjective (ii) a noun relating to an occupation (iii) an noun or adjective relating to a characteristic of the person (religious, occupational, their appearance) as a proper noun (i.e a first name) like in MacDonald.
With all the under consideration I'd suggest the Huaish element is either:
(i) a contraction of Uisdean (pron: OOsh-jin), often translated to Hugh in English. Mac-Ille-Uis
(ii) a connection to the isle of Uist (be it south or north); Colla Uais (pron Cow-lah OO-ish in modern Gaelic) was deposed in Ireland by Muedach Tireach and was banished with 300 of his principal chiefs to the Hebrides in 327 A.D. It is possible that your ancestor moved from the lands of Clan MacDonald in the 1600s to Highland Perthshire and was historically a follower of Colla Uais. Mac-Ille-Uais
(iii) the presence of an H raises the possibility that the latter part of the name started with an S,T or G which become an H sound in the genetive form, i.e. the "of the" form. In this instance, a proper noun actually jumps out rather than an occupation, adjective or "characteristic" noun/adjective: Tàmhais. Known in English as Tavish, this name is a popular surname and derives from the Thomas, most commonly, as a follower of a chapel dedicated to St.Thomas. Donald MacTavish, heir to the Clan MacTavish, settled in Clachan at Ardtalnaig on Loch Tay. Consequently, I think this is by far your most likely answer, though would require a degree of further research.
"Gille" suggests a follower, servant, devotee or footman and in the era prior to the industrial revolution, was actually a relatively high status within society: to be a servant sometimes involved a degree of not only service, but sometimes a level of council or advice - a means of the landed gentry to "run their ideas by" a common-man. Such people lived in relative splendour - having four stone walls and a tiled roof above their head, relatively clean conditions, proximity to powerful clan leaders, access to relatively fine clothing, a consistent wage etc. I'd encourage you to look into the MacTavish presence in the Loch Tay area and to trace your McIllhuaish ancestor as far back as possible: particularly in the Parish records of Loch Tay (births, deaths and marriages in particular). Very few people died with a will, though it's possible and worth a quick peek. Rentals of estates often listed the property contained within the estate, the names of servants and the names of the tenants who occupied the properties. If you are looking to dig deeper, I'd research whether rentals relating to an estate held by MacTavish in the Loch Tay area are available in the National Records of Scotland.
In summary, I think the name is possibly (with further research) derived from the Gaelic surname MacIlleThàmhais or MacIlleThomhais - Son of the Servant of Tavish/Thomas.