I’m going to answer from the perspective of U.S. law, because that’s what I know.
age is a protected class
The idea of protected classes comes from whether Congress or a state legislature protected that class by passing a valid law prohibiting that kind of discrimination. We can describe that generally with protected classes, as a broad summary, but if you’re actually going to get into the weeds of whether some kind of discrimination is legal or not you have to figure out the specific laws.
First, you have to ask what the context is. Is this employment discrimination? Public accommodations discrimination? Housing discrimination? Education discrimination? Each is governed by its own laws. For example Title VII prohibits employment discrimination on the basis of race, color, sex, religion, or national origin. Title VI has the same protected classes, but applies in programs and activities that receive federal financial assistance (like universities and hospitals and others). The Equal Credit Opportunity Act prohibits discrimination in providing credit on the basis of race, color, religion, national origin, and sex (like the Civil Rights Act) and adds on marital status, age, receipt of public assistance.
The Fair Housing Act prohibits discrimination on the basis of race, color, national origin, religion, sex, family status, or disability.
The Americans with Disabilities Act and the Rehabilitation Act add protections for discrimination on the basis of disability.
The Pregnancy Discrimination Act prohibits discrimination on the basis of pregnancy, and the Age Discrimination in Employment Act prohibits discrimination against those over 40 on the basis of age.
So if you’re talking about neighborhoods, you’re only looking at housing discrimination, and not public accomodations or employment or schooling or anything like that. The Fair Housing Act doesn’t prohibit housing discrimination on age. The Age Discrimination in Employment Act doesn’t apply to housing discrimination (and is one of the few that only goes one way, in protecting only people above 40).
How is that not the same as an “active white living” community that bans other races?
Because the Fair Housing Act prohibits whites-only neighborhoods, or any other kind of race discrimination in housing.
On a side note, there’s also constitutional Equal Protection claims for governmental discrimination that comes from the Constitution rather than any law passed by Congress. Those aren’t discussed in terms of “protected” class, but rather in “suspect class,” where non-equal treatment on the basis of race, color, or religion is reviewed by the courts with “strict scrutiny” (and almost always struck down). Unequal treatment on the basis of sex or citizenship is subject to “intermediate scrutiny,” which sometimes survives court review. Unequal treatment on the basis of pretty much anything else, though, gets “rational basis” review and basically survives if the government can come up with any rational reason for the rule.
Cultural appropriation is a broad enough term to functionally be meaningless, but I’ve found it helpful to think through 4 distinct interests at play, that I think are legitimate:
Proper attribution/credit. We don’t like plagiarism or unattributed copying in most art. Remixes, homages, reinterpretations, and even satire/parody are acceptable but we expect proper treatment of the original author and the original work. Some accusations of cultural appropriation take on this flavor, where there’s a perceived unfairness in how the originator of an idea is ignored and some copier is given credit. For a real world example of this, think of the times the fans of a particular musical artist get annoyed when a cover of one of that artist’s song becomes bigger than the original.
Proper labeling/consumer disclosure/trademark. Some people don’t like taking an established name and applying it outside of that original context. European nations can be pretty aggressive at preserving the names of certain wines (champagne versus sparkling wine) or cheeses (parmigiano reggiano versus parmesan) or other products. American producers are less aggressive about those types of geographic protected labels but have a much more aggressive system of trademarks generally: Coca Cola, Nike, Starbucks. In a sense, there’s literal ownership of a name and the owner should be entitled to decide what does or doesn’t get the label.
Cheapening of something special or disrespect for something sacred. For certain types of ceremonial clothing, wearing that clothing outside of the context of that ceremony seems disrespectful. Military types sometimes get offended by stolen valor when people wear ranks/ribbons/uniforms they haven’t personally earned, and want to gatekeep who gets to wear those things. In Wedding Crashers there’s a scene where Will Ferrell puts on a fake purple heart to try to get laid, and it’s widely understood by the audience to be a scummy move. Or, one could imagine the backlash if someone were to host some kind of drinking contest styled after some Christian communion rituals, complete with a host wearing stuff that looks like clergy attire.
Mockery of a group. Blackface, fake accents, and things of that nature are often in bad taste when used to mock people. It’s hard to pull this off without a lot of people catching strays, so it’s best to just avoid these practices. With costumes in general, there are things to look out for, especially if you’re going out and getting smashed.