Is it possible to configure iptables in a way that such incoming connections are blocked?
When browsing the web there are no incoming connections. All connections originate locally at the browser which requests a response from a specific web server. And the HTML/script in the response then causes the popup to display. Thus any attempts to block popups must either block the browser from issuing a request to the specific site, block the request issued by the browser to reach the site or make sure that the browser does not execute the HTML/script causing the popup.
The last way, i.e. not executing the popup, is done by the code inside the browser, which usually limits the number of popups within a time and tries to make sure that a popup is somehow related to a specific action by the user, i.e. useful popups showing that the entered value is invalid or similar. But these heuristics can be tricked and thus you see unwanted popups.
Therefore it might be a better way to restrict access to sites which serve the code causing the popups. Unwanted popups are usually part of advertisement and thus an ad-blocker extension in the browser might help.
But, you've asked if this can be done with iptables. Since iptables is a packet filter only it can only filter access by IP address, port, protocol and similar meta data. Especially it is impossible to use iptables to analyze the content of the servers response and find out if it contains popup code and maybe remove this code. Thus your only option with iptables is to block access to the site causing the popup by IP address, which means that you have to get the IP address first somehow. This might be possible in some cases since the IP addresses of advertising networks usually don't change that often. But note that sometimes a specific IP address is not only used to serve the unwanted popup but also content you actually want to access or content which is needed for properly displaying a site. Thus simply blocking access to an IP address will cause unwanted side effects in some occasions.
This makes iptables an inadequate tool for the problem you want to solve, i.e. it will work in some cases but fail in others and cause unwanted side effects. You better use a tool which works at a higher level, like an ad-blocking extension in the browser.