Let $R$ be a division ring and $M$ be an $R$-module.
What is an example of $M$ and two bases $A,B$ of $M$ such that $|A|\neq |B|$?
Let $R$ be a division ring and $M$ be an $R$-module.
What is an example of $M$ and two bases $A,B$ of $M$ such that $|A|\neq |B|$?
There is no such example.
The proof is exactly the same as in standard linear algebra: let $A=\{a_1,\dots,a_m\}$ and let $B=\{b_1,\dots,b_n\}$. We must have
$$b_1 = \sum r_ia_i$$
with $r_i\in R$, and at least one of the $r_i$'s nonzero; say, without loss of generality, $r_1$, by reordering the $a$'s if necessary. Because $R$ is a division ring, $r_1^{-1}$ exists, so, left-multiplying by $r_1^{-1}$ and reorganizing, we have
$$a_1 = r_1^{-1}b_1 - r_1^{-1}r_2a_2 - \dots - r_1^{-1}r_ma_m$$
Thus $a_1$ is in the span of the set $b_1,a_2,\dots,a_m$, and it follows that this set still spans/generates all of $M$. Thus we can write
$$b_2 = s_1b_1 + \sum_{i=2}^m s_ia_i$$
with at least one coefficient nonzero. However the coefficient of $b_1$ must be zero, because $b_2,b_1$ are linearly independent. Thus the coefficient of one of the $a_i$'s is nonzero, say without loss of generality $a_2$. We can play the same game as above to find that $b_1,b_2,a_3,\dots,a_m$ still generates / spans $M$. Rinse and repeat: as long as there are $b$'s left, represent a new $b$ in terms of the spanning set so far constructed; the coefficients of the $b$'s will all be zero due to linear independence and thus, one of the $a$'s will have nonzero coefficient. We can replace this $a$ with a $b$ and the set will still be spanning. Doing this for all the $b$'s shows that $m\geq n$. (If we ran out of $a$'s before we got to every $b$, then we'd be asserting a spanning set consisting only of $b$'s but missing some, contrary to linear independence of the $b$'s.) Reversing the roles of the $a$'s and $b$'s in the proof, we also get $n\geq m$. So equality.
This is literally the same proof one finds in standard linear algebra (i.e. if $R$ is a field and $M$ is a vector space). The point is that the proof makes no use of the commutativity of multiplication in $R$, so it works equally well over any division ring. Note that it does depend on $R$ being a division ring, so that the expression for $b_i$ in terms of the previous spanning set can be solved for one of the $a$'s.