You don't need it to be OS-level. When an app with ads turns on, just have it grab a whole bunch of potential ads and cache them in some shared data store
That alone would require it to be OS-level, at least on iOS (AFAIK).
You could probably do this with some cleverness using Keychain or a custom URL scheme that an app with ads will only respond to if they have some ads cached. I'm not 100% certain on this though as I've done very little with iOS.
On Android this is obviously much easier. Just use a content provider as I mentioned above.
On Android this is obviously much easier. Just use a content provider as I mentioned above.