I think a sufficient condition is:
the $A$-module $Der_k(A)$ of $k$-derivations of $A$ is projective.
A hint for the proof you may find in an old paper of G.S. Rinehart: Differential Forms on General Commutative Algebras (just have to notice that $(A,Der_k(A))$ is an example of a $(k,A)$-Lie algebra - today known as Lie-Rinehart algebra, or Lie algebroid). Especially: you might want to have a look at Theorem 3.1 and its proof.