Let (A,m) be a local ring and M be a finitely generated Amodule contained in a free module F of rank r with length(F/M) < $\infty$. Then I have the following question : Is the statement "M doesn't have a nontrivial free summand if and only if M$\subset$mF " true? I was trying around Nakayama's lemma

The answer to your question is: no, it is not true. Here is a counterexample. $(A,\mathfrak m)=(\mathbb Z_p,p\mathbb Z_p)$ is the (local Noetherian commutative) ring (PID) of $p$adic integers (you can construct this ring in many ways... probably the standard one is to complete $\mathbb Z$ with respect to the $p$adic topology a base for this topology is given by the powers of the maximal ideal $p\mathbb Z$ the result is that $\mathbb Z_p$ is the inverse limit of the groups of the form $\mathbb Z/p^n$ with the canonical transition maps). Now, take $F=A$ and $M=p^2 A$. It follows essentially by the definition of $\mathbb Z_p$ that I gave you, that $F/M\cong \mathbb Z/p^2$ that has composition length $2$, in particular this is finite. Anyway, $M\cong A$ as modules (just consider the morphism $A\to M$ such that $x\mapsto p^2x$... then surjectivity is obvious and injectivity follows by the fact that $A$ is a domain and so multiplication by $p^2$ has trivial kernel). Thus $M$ has not only free summands but it is itself free. Finally, notice that $pA\supsetneq p^2A=M$ so $M$ is properly contained in $\mathfrak m F$. 


Ok, I'm going to answer a different question for which the answer is "yes". Question: The module $M$ contains no summand of $F$ if and only if $M \subseteq m F$. Proof: Suppose that $M$ did contain an $F$summand. In other words, there is a surjective map $\phi : F \to R$ such that $\phi_M$ is also surjective (note if $\psi : M \to R$ is surjective, sending $x \mapsto 1$, then the composition $R \xrightarrow{1 \mapsto x} M \xrightarrow{\psi} R$ gives us a summand). Thus $$m = mR = m \phi(F) = \phi(mF) \supseteq \phi(M) = R$$ which is impossible. Conversely, suppose that $M$ is not contained in $m F$. Choose an element $x \in M$, not in $mF$. If $e_1, \dots, e_n$ is a basis for $F$, then $x = \sum a_i e_i$ for some $a_i \in R$, at least one of the $a_i$ not in $m$. The projection onto that $i$th summand then clearly sends $x$ to a unit, and so by rescaling, I have a map $\phi : F \to R$ which sends $x$ to $1$. In particular, $x$ generates a summand of $F$. And so $M$ contains an $F$summand. (You can also easily do this part with Nakayama's lemma). 

