It is possible to rank without using H2s & H3s. They are low-level heading tags that have been shown to not be directly correlated with ranking better.
However, heading tags do help indicate the webpage structure, and importance of ideas on the page. Each of these helps Google understand a your webpage. And that is the best way to rank for what you want to rank for – making it easy for Google to understand what you’re talking about.
So, yes and no, not using H2s & H3s does affect on-page SEO, but you can rank the page without them.
But why would you do that? Use them anyway.