I think that glossing over it, or saying nothing is a better response than calling them out or correcting them politely.
People say ignorant or incorrect stuff all the time. It's not your job to correct them. And there may be times when you think they're wrong, but they're not.
It's no big deal if someone else has an incorrect view.
It's no big deal if a friend says something that's personally insulting towards you - once. If they keep going on about something that's putting you down, that's bullying. You should set boundaries when it comes to bullying.
You could also agree and exaggerate when friends say something foolish.
Or you could deliberately misinterpret what they said and turn it into a compliment.
Overall, you should aim to be in chilled, mucking about, having fun mode - especially when with friends.
For sure there will be times when it's appropriate to be in deep dark serious conversation mode. But between those times, fill the atmosphere with lightness and laughter.
Also aim to never settle for a clique of friends. Look to engage socially with everyone you come across, apart from the nastiest bullies. So that your social circle is developing all the time.