While you can use it on any of your WordPress websites, it can be used with any other types of websites or CMS(s) as well.
You can install and use it on your website in various ways and it can be used for nearly every website out there on the internet.
So, to answer your question. There's no need to have a WordPress website to use OptinMonster.