Proof (ergodic theorem)
Fix $x\in I$.
Let $$ \begin{align*} V_n(x) = \sum_{i=0}^{n-1} \mathbb{1}(X_i = x) \end{align*} $$ be the number of times the chain visits $x$ in the first $n$ steps. We want to show $V_n(x)/n \to \pi(x)$ as $n\to \infty$ with probability 1.
Define the return times $T_x^{(n)}$ and $T_x = T_{x}^{(1)}$, and $$ \begin{align*} S_x^{(k)} = \begin{cases} T_{x}^{(k)} - T_{x}^{(k-1)}, &\text{if }T_x^{(n-1)}<\infty, \\ 0, &\text{otherwise}. \end{cases} \end{align*} $$
$P$ is recurrent, so $T_x<\infty$ with probability 1. By the strong Markov property, $(X_{T_x + n})_{n\geq 0} \sim \mathrm{Markov}(\delta_x, P)$ independent of $(X_0, \ldots, X_{T_x})$, and the limit of $V_n(x)/n$ is the same there. Hence WLOG we can assume $\lambda=\delta_x$.
From the definitions, $T_x^{(V_n(x) - 1)}$ is the last time the chain is at $x$ before time $n$, so $$ \begin{align*} n-1 \geq T_x^{(V_n(x) - 1)} = \sum_{k=1}^{V_n(x) - 1} S_x^{(k)}. \end{align*} $$ Similarly, $T_x^{(V_n(x))}$ is the next time the chain is at $x$ at or after time $n$, so $$ \begin{align*} n \leq T_{x}^{(V_n(x))} = \sum_{k=1}^{V_n(x)} S_x^{(k)}. \end{align*} $$ Hence $$ \begin{align*} \sum_{k=1}^{V_n(x)-1} S_x^{(k)} \leq n \leq \sum_{k=1}^{V_n(x)} S_x^{(k)}. \end{align*} $$
Using the strong Markov property, $S_x^{(1)}, S_x^{(2)}, \ldots$ are independent and identically distributed, so $$ \begin{align*} \expect(S_x^{(k)}) = \expect(S_x^{(1)}) = \expect(T_x) = \frac{1}{\pi(x)} \end{align*} $$ where we have used the relation between $\pi(x)$ and $\expect(T_x)$ in a positive recurrent chain. And by the strong law of large numbers, $$ \begin{align*} \frac{1}{N}\sum_{k=1}^{N} S_x^{(k)} \to \frac{1}{\pi(x)} \end{align*} $$ with probability 1.
Therefore by squeezing $$ \begin{align*} \frac{\sum_{k=1}^{V_n(x)-1} S_x^{(k)}}{V_n(x)} \leq \frac{n}{V_n(x)} \leq \frac{\sum_{k=1}^{V_n(x)} S_x^{(k)}}{V_n(x)}, \end{align*} $$ we obtain $$ \begin{align*} \lim_{n\to \infty} \frac{n}{V_n(x)} = \frac{1}{\pi(x)} \end{align*} $$ with probability 1, as required.