If such an advert shows up in my device my approaches would be the following ones. Also, at least a day of yours would be killed in doing so but it would reap good results.
- Install a firewall and restrict everything from connecting to Internet. See Closing internet access for some apps and choose a firewall app.
- Allow one user app in the firewall to connect to Internet. Use that app and see if the ads popup. If negative, then do it for another app.
- A firewall should be keeping a log of which app is trying to connect to Internet, so that should help as well.
Monitor network connections
When that popup shows up, see which apps are connected to Internet. Use an app like OS Monitor. Its Connection tab shows all the connected or apps waiting for connection (listening) on a port.
You can use this approach with a firewall. Restrict all those apps which you saw being connected to Internet at the time the ads popup, allow one of the app and use it, and observe if any ads shows up. Similarly, do it for other apps.
This should help in pin-pointing the source. Otherwise, ad blockers are always a choice to use and forget what's causing those popups.
Either manually or using an app or task manager, kill all the user apps running. Launch one of them, use it and see if the ads popup. Do the same for other user apps. Not a very good approach but nevertheless, it may lead you to source.