No newspaper would run such a thing (key words: editorial control), but if the poster was using coded language, perhaps? I think that's the closest analog here.
With that example in mind, that puts someone running the ad in a weird place, since literally every ad network in 2017 does demographic targeting.
I don't think it's feasible to vet every ad that runs to ensure that the poster is complying with the law.
All that being said, this smells like Facebook, much like any other popular virtual public square, hiding behind the "We're an open platform!" defense when convenient to avoid legal action, and hiding behind the "We're a private company!" defense when convenient to disclaim accusations of poor or inconsistent moderation. They should not get to have it both ways. Either they exercise editorial control and can be liable for what their users post, or they can keep their hands off and push that liability back to the poster.
Rant aside, I'm more interested in the general case of demographic targeting when it comes to certain ads.