methinks you are thinking of the
music "God Save The Queen" which is the same tune as "America" a.k.a. "My Country 'Tis Of Thee" an American patriotic theme.
O Canada, was proclaimed Canada's national anthem on July 1, 1980, 100 years after it was first sung on June 24, 1880.
Prior to adopting our own national anthem, Canada used the British national anthem "God Save The Queen" which causes confusion.