Yes, what you describe sounds like an anxiety attack. Was it triggered off by you having to make a presentation or answer a question in class? If the attacks are recurrent, it will be important to seek medical attention.
If you have anticipatory anxiety (worries about having another attack), it will good to seek medical help. If the anxiety attacks are precipitated by social situations like presenting in class, then the diagnosis is that of social anxiety disorder or social phobia. Yes, the condition can be effectively treated so that your grades will not be affected.