I have a static sidebar on all pages of my website which I made completely myself (it's not a widget or WordPress feature) so I don't see how Google would distinguish it from any other part of the content. Will that harm my SEO considering I have duplicate content on all pages?
Most websites have some elements on the page that are static across all pages on the site:
- Header with logo and search
- Navigation elements (usually in a left or right sidebar)
Parts of pages being static is so common that there is no way that it could hurt your website from an SEO standpoint. It would hurt pretty much all websites.
Your question also implies that Google penalizes for every instance of duplicate content. That is just not true. We have a good resource question here about duplicate content. I suggest you read it. Most of the time Google doesn't penalize for duplicate content, even when the entire page is a duplicate of something else. Google usually just picks one of those two pages to include in the index and does not include the other page. Google's Matt Cutts has even said that duplicate content should only hurt you "if it looks spammy". As long as your users find your static sidebar useful, (it isn't stuffed with keywords and nonsense text) you will be fine.