Can cognitive impairment from mental disorder effect one's grades and overall intelligence?

Of course! No further answer is really indicated here -- it's just an obvious "yes". If you are impaired cognitively -- for any reason -- you should get professional help. Similarly, if you have a "mental disorder", you should get expert professional help.
Different approach. Think of intelligence in two ways. There is ability to perform on testing and there is practical knowledge of the world. Many people do poorly on testing and are considered as cognitively impaired. However, they are very functional in society. Worrying about your intelligence can cause a mental disorder. Managing the mental disorder can help functioning in society.