Let's reframe this to have a better discussion.
IQ is meant to measure fluid intelligence, which is used to approximate ease of learning and subsequently functioning in society to a degree (a few assumptions made by me here).
If earning a high grade is a function of baseline IQ (ease of learning info) + time devoted to the task (motivation+available time+discipline+focus), an A student can be someone with medium IQ and lots of time/devotion, a very high IQ with very little time, or other similar combinations.
I think it's very rare for a. high achieving student to have a LOW IQ, but it's relatively more common for a high IQ person to get "lower" grades than expected due to motivation/discipline/time compromises they make due to values, mental health concerns(ADHD etc.), or socioeconomic stuff (abuse at home, having to work pt time for money etc.).
To summarize, A students aren't necessarily higher IQ (smarter) than B students, but I'd say on average you could say A students would have higher IQs than C students, as you'd need lots of situational/motivational issues to tank a high IQ's grade to the level of C, whereas B students are getting by enough that I wouldn't be as confident saying they are clearly lower IQ than an A student.
Controlling for all of the environmental stuff and discipline etc., i'd say it'd be clearer to say A>B>C in IQ but that's not realistic or reasonable.
Plus if you were to define "Smart/intelligent" as the ability to highly achieve in society, wouldnt your bank account at 50 be a better marker for that than some grades when you were still finding out who you were?