Salam

Yes he said this, but what he is trying to say is that if Rasool (s) did what was commanded at Ghadir early, disputes would not occur, but that Rasool (s) was ordered to not do it till Ghadir. He is not saying Rasool (s) disobeyed God. He is saying Rasool (s) had circumstances that he could not vividly establish this his whole life.
The truth is Ghadir order was finally letting Rasool (s) know he is safe and protected from God to do so.
If Quran was vividly clear in this, there would be disputes, but what would have to happen is Sulaiman (a) type power rule where Quran is forced to be safeguarded or the Quran would not have been safeguarded. It's either God force people to Welayat and Quran stays, or God allows room for rebellion and Quran stays. If the latter Quran is written in a way that allows room for misinterpretation and decontextualization games.
Had Rasool (s) done Ghadir early in his life as God commanded him to do later, there would be no ambiguity in the matter, but a lot of people would not believe in Islam. So Islam would be a weak position.
It would be well established Ali (a) is successor, but people would have rejected Mohammad (s) early.
Thus, Khomeini (q) is expressing wisdom of Mohammad (s) not explicitly establishing this to all people vividly as he did in Ghadeer and also later talks about how Quran is clear in it but has room for misinterpretation.
If there was no room for disputes early about this, Rasool (s) would have been killed earlier as he was killed later, and also a large amount of people who came to Islam after victory would not have tolerated it.
He also explains how Quran was revealed about Imamate of Ahlulbayt (a) and Rasool (s) explained this to companions, but this is not who Quran is talking about protecting him from. It's the people who if Ali (a) Welayat was clear, would have attempted to killed Rasool (s) long time ago. Rasool (s) acted on guarding this truth from pubic and his companions as well. It was not that it was not known at all, it was that was not vividly emphasized on. The latter took place really at Ghadir.