It's a meme, alright. It's simple and very funny, obvious enough that everyone "gets it" when they hear it. However, I don't believe anyone actually does that? I mean, why would you need a rubber duck to talk to, in particular one rocking back and forth to nod its head with agreement? Can't you just talk with yourself?
But that's exactly how it works! You talk to it and walk yourself through your problem to hopefully arrive at a solution.
If you can do it without a duck/rock/colleague/whatever, that's great! But for some, it is easier if they have someone to talk to.