I must be missing something stupid here. A representation $D^{(\mu)}$ of $G$ is irreducible iff the following holds $$\frac{1}{[G]}\sum_{g\in G} |\mathcal{X}^{(\mu)}(g)|^2=1$$ where $\mathcal{X}^{(\mu)}(g)= \text{tr} D^{(\mu)}(g)$ is the character, i.e. the trace of the matrix representation.
I tried working an example. I have the irreducible (over $\mathbb{R}$) representation of $C_3$ given by $$ D(c) = \begin{bmatrix}0 & 1\\-1 &-1\end{bmatrix} \quad D(c^2) = \begin{bmatrix}-1 & -1\\1 & 0\end{bmatrix} \quad D(c^3) = \begin{bmatrix}1 & 0\\0 &1\end{bmatrix} $$ I have $$ \mathcal{X}(c) = -1 \quad \mathcal{X}(c^2) = -1 \quad \mathcal{X}(c^3) = 2 $$ But then $$\frac{1}{3}\left( |-1|^2+|-1|^2+|2|^2 \right)=2\neq 1 $$
What am I doing wrong?
The value you calculate when you see the representation as a real representation or as a complex representation is the same, simply because the traces are the same. Here $D(c)$ doesn't have an eigenvector in $\mathbb{R}^2$ so the representation is irreducible as a real representation, but it has one in $\mathbb{C}^2$, so it's a reducible representation : the value we get in $\mathbb{C}$ should be different from $1$. But the value is the same as that in $\mathbb{R}$ !
So we get a result that's different from $1$ in $\mathbb{R}$ as well, but there the representation is irreducible. So where did we go wrong ?
Well obviously the theorem you mention isn't wrong, but if it could be applied as you do, it would be contradictory. The problem here is that $\mathbb{R}$ is not algebraically closed, and so the theorem doesn't apply to it.
In fact for any nonalgebraically closed field $k$ you can find a similar issue where a representation is irreducible in $k$, but not in an algebraically closed field $K$ containing $k$. The value $\frac{1}{|G|} \displaystyle\sum_{g\in G}|\chi(g)|^2$ will therefore be different from $1$ in $K$, but then it will also be different from $1$ in $k$. This shows that the theorem cannot hold for all fields;and in its proof you actually see that you use the fact that the underlying field is algebraically closed (like $\mathbb{C}$)
What this implies is that checking whether a real representation is irreducible is more complicated than checking whether a complex representation is irreducible.
To perhaps see this more concretely, take the example of abelian groups (as $C_3$): over $\mathbb{C}$ (or any algebraically closed field), irreducible representations of such groups are all $1$-dimensional: obviously (as your example shows) this isn't true for $\mathbb{R}$.