It’s an offense under S.89(1) of the Criminal Code. R v Lacombe, a 2004 case out of Alberta, establishes the best case for how it goes for you, and that still includes a criminal conviction, loss of your firearm, and presumably loss of your privileges of having any other firearms. 2004 ABPC 90 (CanLII) | R. v. Lacombe | CanLIIIf you bring a firearm to a protest, there is a near zero chance of nothing bad happening.
That was was a very particular set of facts wherein the offender behaved specifically so as to make his protest as safe as possible with a wrapped up firearm with bolt removed, and with advance warning to police. Try showing up to a protest carrying/wearing a firearm in any way where it’s at all accessible to you for use, and the best case will probably look like you getting several guns pointed at you while you’re proned out and arrested. You’ll be in custody for several hours, criminally charged, lose your guns, etc. Not a good day.
So, FWIW, not recommended.