Functionally? As far as I can tell, it's when the majority of people (or, people with power over the people in question) decide they prefer people without that trait.
But when it comes to traits that determine social status, people benefit from keeping lower status people - lower status. For instance, I wouldn't want anyone shorter than me - that I don't care about - becoming any taller; that puts me at a disadvantage.
I think a better way to determine a treatable defect: When the majority of people feel sorry for you because of the traits you have and therefore feel compelled to treat those traits. [I believe you're saying the same thing, but I added the sympathy part]. This raises the issue of what traits should reach...
There was some talk here about height taxes, but there's a better solution - redefine shortness as a treatable condition and use HGH to cure it. They even got FDA on board with that, at least for 1.2% shortest people.
Unsatisfactory sexual performance became a treatable condition with Viagra. Depression and hyperactivity became treatable conditions with SSRIs. Being ugly is already almost considered a treatable condition, at least one can get that impression from cosmetic surgery ads. Being overweight is universally considered an illness, even though we don't have too many effective treatment options (surgery is unpopular, and effective drugs like fen-phen and ECA are not officially prescribed any more). If we ever figure out how to increase IQ, you can be certain low IQ will be considered a treatable condition too. Almost everything undesirable gets redefined as an illness as soon as an effective way to fix it is developed.
I welcome these changes. Yes, redefining large parts of normal human variability as illness is a lie, but if that's what society needs to work around its taboos against human enhancement, so be it.