There will probably be many photographers if it's a big event. Attention will often be focused elsewhere and many people won't notice you. Some people will pose: why protest if you don't want to be seen and heard? Use a wide angle lens, f/8 or f/11 for depth of field, pre-focus a few feet away so everything looks in focus, and you can snap without having to carefully compose. If the camera isn't in front of your face people are less likely to notice it.
Be aware that protests can get very crowded. A backpack will keep bumping into people, be difficult to access, and limit your mobility when you want to walk through crowds. Take the tiniest bag possible. Don't bring multiple lenses.
There's always a risk for peaceful protest to escalate into something else. That's not a reason to skip it, but plan accordingly in case things go wrong. There are always some jerks in any big crowd. Counter-protestors can show up looking for a fight. Police can make crowd control mistakes if more people show up than expected.
Wear clothing that can let you pass as either a protester, professional photographer, or some bystander who got caught up in things. Jeans and a dark shirt. That gives you flexibility to blend with the crowd, or leave the crowd to take photos from outside the protest.
Here's an example. The guy front-right didn't notice me while front-left sees and doesn't care. This was taken with a pocket camera but I've had similar experiences with a DSLR and small lens.