The Associated Trait Fallacy is having a trait that you want to screen for, and instead defining your test on a trait associated with that one when you have a direct way of measuring the trait you're interested in.
An example I'm sure we can all agree out of the box is minimum word requirements on essays. What you care about is that the essay is good; the word count is at best a weak indication of quality of writing that you can use if you don't have time to read the actual writing. So all you're doing by making the word count an actual criterion for judgement is discrediting essays that make equally powerful points in fewer words than you expected.
A perhaps less obvious example is age-gating the military (or almost any organization for that matter).
What traits do you actually want in someone who's going to join your army? You want strength, maturity, courage, intelligence, et cetera. You only care about the recruit's age insofar as it's correlated with those things. So given that it's possible to test those things directly there's no valid way to measure intelligence in general, but if you're interested in a specific area of expertise, you can test that easily by putting them in the kind of situation they're going to be in and they in fact will be tested directly during training (courage is tested just by the act of volunteering), there's no rationale at all for barring people from entry based on their age.
This came up a lot in my childhood, where I would often invent fictional military organizations (as in The Color Wars, an abandoned story I believe I've referenced somewhere) and say that they don't have an age-gate in their recruiting process. The objection was always: "They recruit four-year-olds?!?" And the answer was always, rationally: "They recruit anyone who's on their side and strong enough to fight. They don't currently have any four-year-old members, but they wouldn't be opposed to a four-year-old with the strength of an adult if one existed. Would you?"