If you'd like to target a specific demographic you can do so using either inclusionary or exclusionary targeting. Only one of those systems also allows you to explicitly exclude one or more groups rather than just target a subset of groups. Your example seems to be a very charitable interpretation of how exclusionary targeting could be used. There's (probably) nothing wrong with it if it's used that way. But you could just as easily use the system you described to prevent a variety of protected demographics from being able to see the advertisement whatsoever.
https://www.ajc.com/visitor_agreement_mobile_old/
Equal Housing Opportunity. Any real estate advertising on this website is subject to the Fair Housing Act, which makes it illegal to advertise "any preference limitation or discrimination based on race, color, religion, sex, handicap, familial status or national origin, or an intention to make any such preference, limitation or discrimination." Georgia state law also forbids discrimination based on these factors, except that it forbids discrimination based on "disability" rather than "handicap." Familial status includes children under the age of 18 living with parents or legal custodians; pregnant women and people securing custody of children under 18. To complain of discrimination call the U.S. Department of Housing and Urban Development at 800-669-9777.