For this the phone has to be rooted and the mobile version of a ads-blocking HOSTS file can be used.
Here is an example: http://free-software-for-android.github.io/AdAway/

For mobile data, the DNS server would be provided by the telco. If the browser will take a proxy, then a content-filtering proxy IP can be used.