Criteria for local freeness of a module Let $M$ be a finite type module over a local ring $R$. If the minimum number of generators equals the maximum number of independent elements, is $M$ free? If not, do you have a counterexample?

No need to assume $R$ local in order to show that $M$ is free.
Suppose that $M$ can be generated by $n$ elements. Then there exists $R^n\to M$ a surjective homomorphism. Denote by $x_1,\dots,x_n$ a linear independent subset of $M$ and by $N$ the submodule of $M$ generated by $x_1,\dots,x_n$. Then there is an isomorphism $N\to R^n$. This way we get a surjective homomorphism $N\to M$ and this is necessarily an isomorphism, so $M$ is free.
