I was on an AC flight this week and saw two people with guitars. One gate-checked it and the other purchased a separate seat.
From the FIM (musician's association) web site: String instruments (e.g. guitars, violins and violas) can be carried on board — even if their dimensions slightly exceed Air Canada’s
carry-on size requirements — as long as they fit in the overhead bin and there is space available in the cabin at time of boarding, or you have purchased a seat to accommodate them.
https://www.fim-musicians.org/airline/air-canada/
I don't think a standard-sized guitar "slightly" exceeds the carry-on size requirements.