Submodule of a free module over commutative ring with 1 is not free. For this statement, can $Z_n$ be the counter example for it?
When $n=8$, $\{0,2,4,6\}$ is an ideal of $Z_8$ and is not free.
My second question is as follows:
We can consider commutative ring $R$ with unity as a $R$-module. Then, it is finitely generated by the unity. For case of integral domain $D$, the unity generates $D$ and it is independent because of no zero divisor, so it is free.
Is it true?
Your counterexample is good. Any nonzero free $Z_8$-module must contain at least eight elements.
I don't understand the second part.
Edit. In answer to the second part as it's been rewritten, given any commutative ring $R$ with a unit element $1$, we have that $R$ is a free $R$-module. It isn't necessary to assume that $R$ is an integral domain.
As you said, $R$ is generated as a module by the element $1$. But the family $\{1\}$ is also linearly independent, because $a \cdot 1 = 0$ implies that $a = 0$. Therefore the family $\{1\}$ is a basis.
In an integral domain, for any $b \ne 0$, the family $\{b\}$ is linearly independent. This is not true in other rings with unit. However, when $b = 1$, it is always true.