Maybe, but I would argue probably not. Not long after the quoted conversation, Gandalf says to Théoden (emphasis mine):
If Éomer had not defied Wormtongue's voice speaking with your mouth, those Orcs would have reached Isengard by now, bearing a great prize. Not indeed that prize which Saruman desires above all else, but at the least two members of my Company, sharers of a secret hope, of which even to you, lord, I cannot yet speak openly.
Two Towers Book III Chapter 6: "The King of the Golden Hall"
The "secret hope" shared by Merry, Pippin, and Gandalf can only mean the plan to destroy the One Ring.
That does leave the business of what, exactly, Gandalf did tell Théoden. Unfortunately I'm not aware of a canon answer, but I've seen much speculation:
Gandalf did tell Théoden about the Plan. This theory holds that my quote above is addressed more at the court than at Théoden; that is, he told Théoden some things in private, and then publicly said "Now don't spread it around."
I think this is probably unlikely, though, because the destruction of the Ring is a foolhardy plan at best; knowing that the Ring is being carried into Mordor, practically gift-wrapped, will probably not set Théoden's mind at ease.
Gandalf just said something about the Ring. It's not clear what that he might have said, but this seems more plausible than the above. Simply knowing that the Ring is in safe hands is likely to make Théoden feel a bit better about things
Gandalf told him some other secret about Sauron. Obviously Gandalf has a lot of knowledge about Sauron, so he could have given Théoden any number of pieces of intelligence; anything that indicates Sauron isn't as strong as he appears
For what it's worth, an earlier draft of the chapter gives us more insight into what Gandalf said:
[Gandalf's] voice was low and secret, and yet to those beside him keen and clear. Of Sauron he told, and the lady Galadriel, and of Elrond in Rivendell far away, of the Council and the setting forth of the Company of Nine, and all the perils of their road. 'Four only have come thus far,' he said. 'One is lost, Boromir prince of Gondor. Two were captured but are free. And two have gone upon a dark Quest. Look eastward, Théoden! Into the heart of menace they have gone: two small folk, such as you in Rohan deem but the matter of children's tales. Yet doom hangs upon them. Our hope is with them - hope, if we can but stand meanwhile!
History of Middle-earth VII The Treason of Isengard Chapter 26: "The King of the Golden Hall"
Based on that version, it appears as though he told Théoden something about the Quest. However, I still find it unlikely that he revealed the specifics of the plan, for the reason I gave above: it's not a very reassuring plan.