Hypothetically, Starfleet should be able to employ neurodivergent people the same as NT, regardless of masking.
The Academy or whatever would recognize a persons ND gradient and help them learn to do their job within their skill sets.
Those who suffer from mental illness would have to be treated, for example, someone who is bipolar requires certain treatment and/or medications in order to function properly, etc.
That doesn't necessarily mean that they couldn't participate with the appropriate accommodations.
We also see in DS9 that some people are simply too ND to fit in with general society no matter how much they try. Those people wouldn't be able to get jobs in starfleet because they wouldn't be able to understand the proper authority and all.