Two definitions of ergodicity Definition A: Let $(X,\mathcal{A},\mu)$ be a probability space. Let $T: X\rightarrow X$ is $\mu$-invariant ($\mu(T^{-1}E)=\mu(E)$ for all $E\in \mathcal A$). Then $T$ is ergodic if for every $E\in \mathcal{A}$ with $T^{-1}(E) = E$, we have $\mu(E)=0$ or $1$.
Definition B: Let $(X,\mathcal{A},\mu)$ be a probability space. Let $T: X\rightarrow X$ is $\mu$-invariant ($\mu(T^{-1}E)=\mu(E)$ for all $E\in \mathcal A$). Then $T$ is ergodic if for every $E\in \mathcal{A}$ with $T^{-1}(E) \subset E$, we have $\mu(E)=0$ or $1$.
The difference between two definitions is $T^{-1}(E) = E$ vs. $T^{-1}(E) \subset E$. Definition A comes from Definition 2.13 of the book by Einsiedler and Ward and Definition B is from the entry "Ergodicity" of Wikipedia. There are more things to check for the Definition B. So B is stronger than A.
Can we prove they are equivalent?
 A: One can show that the first definition is equivalent to the following one:

A measure preserving transformation $T$ is ergodic if for every measurable set $A$ with $\mu(A\Delta T^{-1}(A))=0$, $\mu(A)=0$ or $\mu(A^c)=0$.

This comes from the fact that for any such $A$ there is a set $B$ s.t. $T^{-1}(B)=B$ and $\mu(B\Delta A)=0$.
Now, in the second definition $E\supset T^{-1}(E)$, which implies that $\mu(E\Delta T^{-1}(E))=0$ because $\mu(E)=\mu(T^{-1}(E))$, and so it is equivalent to the first definition.
A: Suppose $T$ is ergodic in the sense of Definition A. Let $E$ be such that $T^{-1}E\subset E$. Then $\{T^{-n}\}$ is a decreasing sequence of subsets of $E$, all of the same $\mu$-measure, with $T$-invariant intersection $H:=\cap_nT^{-n}E$. If $\mu(H)>0$ the $\mu(H)=1$ (by A-ergodicity) and so $\mu(E)=1$. Otherwise, $\mu(H)=0$; this imples that $\lim_n\mu(T^{-n}E)=0$, and finally that $\mu(E)=0$ because $T$ preserves $\mu$. Thus $T$ is also ergodic in the sense of Definition B.
A: In terms of Markov Chains, Definition B means that transformation $P$ acting on $\mathcal{A}$ as $P\mathbb{1}_A:=\mathbb{1}_A\circ T=\mathbb{1}_{T^{-1}(A)}$ is $\mu$-ergodic iff for any absorbent set $A$ (i.e. as set $A$ such that $P\mathbb{1}_A\geq \mathbb{1}_A$), $\mu(A)\in\{0,1\}$.
Indeed,  $T^{-1}(B)\subset B$ iff  $A=B^c\subset (T^{-1}(B))^c=T^{-1}(B^c)=T^{-1}(A)$.
The notion of absorbent sets is more natural in the context of Markov Chains; An absorbent set is a set such that once the system (the Markov chain or process) reaches it, the system will remain there almost surely.
The equivalence between definitions A and definition B is rather simple to check in the setting of the OP since the $T$ invariant measure $\mu$ is finite. I want to point out that under an additional condition, Definitions A and B are also equivalentwhen when  $\mu$ is a $T$-invariant measure with $\mu(X)=\infty$. Here is a useful result that will help me explain this.

Lemma 1: Suppose $\mu$ is a $T$-invariant measure on $(X,\mathcal{A})$ (not necessarily finite). If $A\in\mathcal{A}$ and $\mu(T^{-1}(A)\triangle A)=0$, then there exists $\hat{A}\in\mathcal{A}$ such that $T^{-1}(\hat{A})=\hat{A}$ and $\mu(A\triangle\hat{A})=0$.

Proof: Define $\hat{A}=\bigcap^\infty_{n=0}\bigcup^\infty_{m=n}T^{-m}(A)$. Clearly $T^{-1}(\hat{A})=\hat{A}$. Observe that
\begin{align}
\hat{A}\triangle A\subset \bigcup^\infty_{m=1}(T^{-m}(A)\triangle A)
\end{align}
From
\begin{align}
\mu(T^{-m}(A)\triangle A)&=\int|\mathbb{1}_{T^{-m}(A)}-\mathbb{1}_A|\,d\mu\leq \sum^m_{j=1}\int|\mathbb{1}_{T^{-j}(A)}-\mathbb{1}_{T^{-j+1}(A)}|\,d\mu\\
&=\sum^m_{j=1}\mu(T^{-j}(A)\triangle T^{-j+1}(A))=m\mu(T^{-1}(A)\triangle A)=0
\end{align}
we obtain that $\mu(\hat{A}\triangle A)=0\qquad\Box$.
Remark: The family of all $\mu$-almost surely $T$-invariant sets $\mathcal{I}^\mu_T=\{A\in \mathcal{A}: \mu(T^{-1}(A)\triangle A)=0\}$ is a sub $\sigma$-algebra of $\mathcal{A}$. Indeed, it contains $X$; it is closed under complementation ($T^{-1}(A)\triangle A =T^{-1}(A^c)\triangle A^c$); it is closed under finite intersections $|\mathbb{1}_{T^{-1}(A\cap B)}-\mathbb{1}_{A\cap B}|\leq \mathbb{1}_{T^{-1}(B)}|\mathbb{1}_{T^{-1}(A)}-\mathbb{1}_A|+\mathbb{1}_A|\mathbb{1}_{T^{-1}(B)}-\mathbb{1}_B|$); closed under finite unions ($\mathbb{1}_{T^{-1}(A\cup B)}=\mathbb{1}_{T^{-1}(A)}+\mathbb{1}_{T^{-1}(B)}-\mathbb{1}_{T^{-1}(A\cap B)}\stackrel{\text{$\mu$-a.s.}}{=}\mathbb{1}_A+\mathbb{1}_B-\mathbb{1}_{A\cap B}=\mathbb{1}_{A\cap B}$; and thus, closed under countable nondecreasing unions.
Remark: The typical to define a $T$-invariant measure $\mu$ (not necessarily finite) as ergodic if $0\in\{\mu(A),\mu(X\setminus A)\}$ for all $A\in\mathcal{A}$ such that $T^{-1}(A)=A$. In view of Lemma 1, $\mu$ is ergodic iff $0\in\{\mu(A),\mu(X\setminus A)\}$ whenever $A\in\mathcal{I}^\mu_T$.
A set $A\in\mathcal{A}$ is $T$-absorbent if $A\subset T^{-1}(A)$. Obviously, any strictly invariant set (i.e., a set $A\in\mathcal{A}$ such that  $T^{-1}(A)=A$) is absorbent. When $\mu$ is a finite $T$-invariant measure, it is obvious that every absorbent set is in $\mathcal{I}^\mu_T$.  If $\mu$ is infinite, then this is not necessarily the case. Lemma 1 yields the following result:

Theorem: A $T$-invariant measure $\mu$ (not necessarily finite) is ergodic iff $0\in\{\mu(A),\mu(X\setminus A)\}$ for any $T$-absorbent set $A\in\mathcal{I}^\mu_P$.

This is the (quasi)-equivalence between definion A and B in the OP's posting. Notice that the additional condition  $A\in\mathcal{I}^\mu_T$ for an absorbent set is vacuous if $\mu$ if finite.

Final comments: The notion ob absorbent set (or state) more meaning fun in the context of Markov Chains with a given probability transition function $P(x,A)$ (for fixed $A\in \mathcal{A}$, $x\mapsto P(x,A)$ is $\mathcal{A}$-measurable, and for fixed $x\in A$, $A\mapsto P(x,A)$ is a probability measure). A set $A$ is absorbent is $P\mathbb{1}_A(x)=P(x,A)\geq \mathbb{1}_A(x)$ for all $x\in X$). A measure $\mu$ (not necessarily finite) is $P$ invariant if $\mu P(A)=\int P(x,A)\,d\mu(dx)=\mu(A)$ for all $A\in\mathcal{A}$. A set $A$ is $\mu$-a.s. invariant if $P\mathbb{1}_A=\mathbb{1}_A$ $\mu$-a.s. Definition of ergodocity is given in terms of $\mu$-a.s invariant sets. A more descriptive explanation is here.
