This has happened with a few novels I've read lately. With the current review book, the head of a London mental institution writes to a colleague, in 1896: "... this fad will pass as others have. There is no future in Freudianism." (It's a decent book, don't get me wrong, despite this bit of silliness)
And then there are the scenes I've read in some Tudor-set novels. It's almost stereotypical. Some gossipy English villager, cackling at the fall of Anne Boleyn, makes a prediction that "Nan Bullen's bastard daughter - what a shame she's a girl. She'll never amount to anything." The readers, of course, are gleefully laughing up their sleeves at such horrible ignorance. They know better.
In a previous read, we had a similar scenario featuring Caligula, presented as a spiteful, smarmy adolescent who surely wasn't destined to rule the Roman Empire, as one very minor character in the novel remarked. These comments may have been historically appropriate - Germanicus was the favored heir at the time - but the reader's foreknowledge of Caligula's eventual succession gives them added meaning.
These little asides nearly always draw me out of a story. Maybe because I don't want an author reaching out from behind the plot to congratulate me on what I know about history? These tactics feel too obvious, if that makes sense. Good for a chuckle, maybe, but not much more.