A variation on Ishai's example is a closed embedding: its sheaf of relative differentials is $0$, hence free of finite rank, even though it needn't be smooth. However, $k[e] / e^2$ over $k$ is not actually a counterexample (except in characteristic $2$). The module of relative differentials of $\operatorname{Spec} k[e] / e^2$ over $\operatorname{Spec} k$ is not free if the characteristic of $k$ is not $2$. Let $A = k[e]$ and $B = k[e] / e^2$. Then $$\Omega_B = \Omega_A (x) B / d(e^2) = k[e] / (e^2, 2e)$$ via the isomorphism $\Omega_A \to A : dt \to 1$. This is not isomorphic to $B$ unless $2 = 0$. On the other hand, you can conclude that $B$ is smooth if its cotangent complex is a vector bundle in degree $0$. In the case of $k[e] / e^2$, the cotangent complex is $$ [ I_{B/A} / I_{B/A}^2 \to \Omega_A (x) B ] = [ e^2 A / e^4 A \to B\ de ] $$ in degrees $[-1,0]$ and the differential is the universal derivation. (I write $I_{B/A}$ for the ideal of $B$ in $A$.) Even in characteristic $2$, the differential has a kernel, so the cotangent complex is not concentrated in degree $0$.