Alex, you're reminding me of the movie Clueless - the scene in which three characters, modern LA teenagers all, are riding along in a car, and one of them says, "It's like Hamlet said, 'To thine own self be true.'" The one riding in the back pipes up and says, "Hamlet didn't say that."

first one: I think I know my Shakespeare. It was Hamlet.
backseat: I think I know my Mel Gibson, and he never said that. It was that Polonius dude.

I'm paraphrasing coz I don't remember the exact dialogue, but that's close enough....I think I'd credit Shakespeare, probably, in conversation - eg:

friend: My family want me to go into law school, but I want to be a doctor.
me: Well - to thine own self be true.
friend: That's good, I like that. Who said it?
me: I did.
friend: But you're quoting someone, right?
me: O, all right. It was Shakespeare.
friend: Play or sonnet?
me: Play - Spamlet.

Or similar. I can't always remember which character said the thing I liked - but I can usually remember if 'twas written by Shakes or some other almost-as-great. And once you know the author, the character whom the author used as mouthpiece is lookable-uppable, for them as are interested.