This is a hard situation to be in. I was in the same situation, different language, not all that long ago. It was a tiny class and although I had progressed through each of the preceeding levels with acceptable marks there was a student in the class who already knew 8+ other languages and whose career was based around learning and using languages. Compared to that me, who had never learned a language before in my life, and there was a huge disparity.
How to handle this really depends on a couple of factors.
One of those factors is the instructor. The instructors for the course I was in were nice and sympathetic but, ultimately, unable or unwilling to reign in the advanced student. Without instructor support in such a small class situation you will have difficulty making any changes in what is happening.
That leads to another factor... What are you willing to do about this? I spent an exhaustive semester trying to 'catch up' to this student so I wouldn't constantly feel like I was being left behind. This is tempting for a lot of students in this situation. "I will work harder! And this will make things better!" The problem is that this depends on your other time commitments(can you afford to spend an additional _ hours every day on this language), your aptitude for learning languages(some people are just slower at learning certain topics than others), your other base knowledge(if you don't remember what a conjugated adverb is then you'll have another layer of learning on top of what you are currently learning), and, frankly, your own frustration level with the course and subject material.
I don't normally say things like this but I think Wolfgang Kuehne's answer is unhelpful at best. Learning a language in a class should be a collaborative effort among students guided by their instructors. I'm iffy about the decisions to have super tiny language-learning courses (my situation became untenable once the course size dropped to 3 students) because when you run into this situation there's no buffer. Things would, I image, be very different in your situation if there was a range of other students in the course with a range of other skills. But as a student there is only so many times you can 'risk' saying something in another language to be immediately, and always, corrected by another student in the course. If there is no give and take, if there is never a time when you are correcting and the other is learning(and vice versa) then it pushes the corrected student into an unfortunate position.
Ultimately, and this may or may not be what you want to hear, I finished off the semester(it was needed to graduate on time) and I dropped the language(which I was planning on taking throughout my student career). Additionally I was put off both on the language itself and the process of learning languages in general. Having been in your situation, and maybe projecting a bit based on my own experiences; if your instructor is unwilling to go to bat for you and make sure things stay at an appropriate level, the other student is not dominating the learning time and you are not left feeling like the 'stupid one' in the class then, if you can, you should drop the class.
You have done nothing wrong. The other student, probably, has also done nothing overtly wrong(though good golly can they seem like jerks in this situation). But it's not going to be a great learning environment for you and, if that's the case, you'll get more benefit by using your time in a less frustrating environment.