Suppose $(R,\mathfrak{m})$ is a local ring and $M$ is an $R$-module of finite length. What are some conditions, under which we have $$\operatorname{length}_R(M)=\dim_kM,$$ for an "appropriate" field $k$ isomorphic to the residue field $R/\mathfrak{m}$?
This ($\leftarrow$ click) question is a very simple case, where $M$ is assumed to be an $R/\mathfrak{m}$-module, that is, $M$ is assumed to be annihilated by $\mathfrak{m}$.
Here ($\leftarrow$ click) is another special case where the ring $R$ is assumed to be Artinian, which I think is not necessary.
In general, I think the condition $\operatorname{length}_R(M)=\dim_kM$ holds if $R$ contains a field $k$ such that the composition $k\hookrightarrow R\twoheadrightarrow R/\mathfrak{m}$ is an isomorphism. For instance, every complete local ring of equal characteristic satisfies this condition.
The proof that I have in mind is by induction on $\operatorname{length}_R(M)$. First, the hypothesis "$R$ contains a field $k$ such that the composition $k\hookrightarrow R\twoheadrightarrow R/\mathfrak{m}$ is an isomorphism" shows that $\dim_kR/\mathfrak{m}=1$. So, clearly $\operatorname{length}_R(R/\mathfrak{m})=\dim_k R/\mathfrak{m}$ holds. Now suppose the statement holds for any $R$-module of length $<n$ and let $M$ be an $R$-module of length $n$. Then we have an exact sequence of $R$-modules $$0\rightarrow M^\prime\rightarrow M\rightarrow R/\mathfrak{m}\rightarrow 0.$$ As $\operatorname{length}_R(M^\prime)=\operatorname{length}_R(M)-1=n-1$, it follows from the induction hypothesis that $$\operatorname{length}_R(M)=\dim_k(M^\prime)+1.$$ But viewing the above exact sequence as an exact sequence of $k$-vector spaces, we also have $$\dim_k M=\dim_kM^\prime+1,$$ from which it follows that $\operatorname{length}_R(M)=\dim_kM$.
Am I correct?