No function that is continuous at all rational points and discontinuous at irrational points. [duplicate]

Yes, what you remember is true.
The set of discontinuities of $g$ is a $F_\sigma$, a denumerable union of closed subsets of $[0,1]$, and the irrationals are not such a union because of Baire's theorem.

Edit
Let me show in detail (as an answer to Linda's question in the comments) why $[0,1]\setminus \mathbb Q$ is not a union $\bigcup F_n$ of countably many closed subsets $F_n\subset [0,1]$.
First note that each $F_n$ would have empty interior since else it would contain some rational numbers.
On the other hand $[0,1]\cap \mathbb Q=\bigcup G_n$ with $G_n=\lbrace q_n\rbrace $, with the $q_n$ some enumeration of $\mathbb Q$.
So we would have a presentation $[0,1]=(\bigcup F_n)\bigcup (\bigcup G_n)$ of the complete metric space $[0,1] $ as a denumerable union of closed sets without interior. Baire's theorem says that this is impossible.