If you are actually diagnosed with ADHD, it could. It's not just medication that presents an issue -- there can't be special accommodations, such as an IEP, extra time, etc. There are lots of threads on this topic both in this forum and in the DODMERB forum. You might want to do a search under "ADHD".
The bigger question is why have you received this recommendation? You don’t need to answer that here but you should be seriously asking yourself what symptoms you are experiencing and how you are dealing with them and how you would cope in the stressful SA environment. Only you know. Just keep it real.
If you are forgetting to turn off the stove and losing your homework, and locking your keys in the car, while struggling at grades, then you gotta be realistic about your ability to cope as a military officer. Getting help would be far more important...maybe essential.
If on the other hand, you were once caught daydreaming in history class because you are bored out of your mind and can ace the test blindfolded, then it may be an entirely different situation.