The short answer: yes, he was able to understand the song.
Your teacher is partly right (and wrong in her conclusion) here; there is indeed an implied meaning, but her analysis is back-to-front. I interpret the line:
He is not so stupid that he cannot understand the song.
in the following manner:
It might be true that he is relatively stupid, but he is not so stupid that he cannot understand the song.
The point is that he would need to be even more stupid than he currently is, in order to not understand the song. I.e., he passes the minimum required level of understanding.
The mistake your teacher appears to have made is interpreting each part of the sentence in isolation:
he is not so stupid (meaning that he has some basic level of intelligence)
he cannot understand the song (meaning that his understanding is flawed)
However, you are correct that the use of that as a comparison with an adjective and an outcome changes the interpretation of the sentence:
- He was so ____ that ____.
- He was so tired that he fell asleep right away.
- He has so happy that he didn't notice it was raining outside.
The negation makes your original sentence a little more complex to break down, but it's still just a situation leading directly to a consequence. See this resource for a more in-depth grammatical look at that.