There is no conflict of interest in owning media and an ad agency. Not terribly common, but there is an ethical issue of disclosure, but no prohibition.TownSquare is successful by acting as an online ad agency for its customers. They take money from a local business and distribute it among Facebook, Google, Yelp, etc. I think they distribute some $$$ to their own radio stations, with the customer's permission.
Is that a conflict of interest? Probably.
At one point, I owned an agency in Ecuador where I also owned 13 radio stations. One of my major points in pitching to clients was that they would save the agency commission, as I would adjust rated down on inter-company sales.