You may be "over analyzing" Rashi"s Kal Vachomer, here.
First, translate what Rashi said in the context of the word he is explaining as well as the entire verse. Rashi is explaining the word, "lehakdisheini" - "To sanctify me". In other words, Moshe hit the rock. God said to Moshe SPEAK to the rock. So, Moshe did NOT do God's will, and therefore did not sanctify God's name. Had Moshe spoken to the rock, both Moshe and the rock would have been performing God's will. The people would have said, that just as the rock "responded" to Moshe who spoke to it because God commanded Moshe to speak to the rock, so to should we learn the importance of obeying God's will...
Supplemental to this explanation, view the Sifsei Chachamim marked letter Heh on the verse immediately before this one.
Summarizing what Sifsei Chachamim says - Moshe asked, "Can we bring water from this rock?" - Sifsei Chachamim emphasizes the word THIS, implying that all rocks have the ability to bring forth water. But, Moshe doubted that the specific rock that God told him to speak to would be the one that could do it. By hitting the rock, Moshe didn't prove anything and didn't sanctify God because people thought, "Oh, this is no different than any rock that brings forth water." But had Moshe spoken to the rock, they would have said, "Oh! This specific rock brought forth water because it was listening to God's commandment to bring water, not just because it had the water in it and it would have done so, anyway."
Since when does a rock have intelligence and free will? Isn't it forced to do whatever it does?Rsshi's kal vachomer seems flawed because it compares rocks to humans. An integral difference between the two, precluding any Kal vachomer is that humans have free will, unlike rocks – robev Jun 17 '21 at 18:46