Can the Kahler differentials of a "good" local ring R be free of rank not equal to dim(R)? Let $R$ be a local ring containing a field isomorphic to its residue field $k$. Assume $R$ is a localization of a finitely-generated $k$-algebra.


*

*Can $\Omega_{R/k}$ be free of rank $r\neq\dim{R}$? If it can, are there bounds on $r$?

*Does requiring $k$ to be perfect change anything?

 A: Yes, this may happen. For example, take $k = {\mathbb F}_p$ and $R := {\mathbb F}_p[X]/(X^p)$. Then $\Omega^1_{R/k}\cong R\cdot\text{d}x$ is free of rank $1$ over $R$. Considering the tensor powers $R\otimes_k ...\otimes_k R$ also shows that there is not even a bound on $r$. 
Edit Deleted rubbish. Another try: If $R$ is reduced and $k$ is perfect, then we may realize $R$ as the local ring at a $k$-rational point of a reduced $k$-variety $X$ such that $\Omega_{X/k}$ is free of rank $r$, say. Then $X$ is geometrically reduced, hence generically smooth. Now, for smooth $k$-varieties $X$, the local rank of $\Omega^1_{X/k}$ is the dimension, so we conclude that $X$ is equidimensional of dimension $r$, and in particular $r = \text{dim}(R)$.
A: I know very little about characteristic $p$ geometry, so I'm assuming $k$ is characteristic zero. Also, I'm taking $R$ to be a domain, so this is more a brainstorm about singularities than about reducible varieties.
Let $K$ be the field of fractions of $R$. Then $\Omega_{R/k} \otimes K$ is a $K$-vector space of dimension $r = \dim(R)$. (Indeed, $\{df_i\}$ form a $K$-basis for this vector space if and only if the $\{f_i\}$ form a transcendence basis for $K/k$.) So right away we see that the only possible rank that $\Omega_{R/k}$ could have, if it were in fact a free $R$-module, is $r$. If it isn't free, it's because $\dim_k (\Omega_{R/k} \otimes k) > r$ as a $k$-vector space.
(Recall that, for finitely-generated modules $M$ over local (noetherian) domains, $M$ is free if and only if $\dim_k (M \otimes k) = \dim_K (M \otimes K)$.)
