It's OK to inject ads, but not OK to remove them, under Google's current policies.
They have an API basically dedicated to this: https://developer.chrome.com/docs/extensions/reference/api/d...
I think you may have been confused about the Manifest V3 API changes, which were controversial because they didn't support every feature of the old API. The mainstream ad blockers all wrote new versions for Manifest V3.
Injecting ads will get you removed from the extension store if caught, while adblockers are advertised on the front page of the store.
Did the JSON formatter with ads get kicked out of the extension store yet?
[1] https://arstechnica.com/gadgets/2024/08/chromes-manifest-v3-...
Google really is slow boiling Internet until everyone forgets you can have stuff without ads.