I'm not sure exactly how to ask this question in a vacuum so I'll give an example first:
Many people are familiar with the Mitch Hedberg joke about an escalator being "temporarily stairs" rather than "broken". You may be in a group of friends that knows his material, so if you come across a broken escalator, someone might make the joke or reference it in some way.
In normal conversation there's no attribution. You'd say "oh look, temporarily stairs", not "well, as Mitch Hedberg said, ...". Conversation is very informal.
So the question then is, how would you do something like this in fictional dialogue, keeping to the spirit of this type of casual conversation without coming across as if you're ripping someone off?