If we assum the underlying scheme is Notherian and reduced. 



Is the kernel of a morphism of locally free sheaves still a locally free sheaf?
Let $X$ be a smooth quasi-projective variety over a field of dimension $n$ and $Z\subseteq X$ a subvariety such that the depth of $\mathscr O\_Z$ at a fixed (closed) point of $X$ is $d$. Assume that $n-d\geq 3$, i.e., the projective dimension of $\mathscr O\_Z$ at that closed point of $X$ is at least $3$. Then consider a locally free sheaf that surjects onto the ideal sheaf of $Z$. That gives a morphism to $\mathscr O\_X$ and its kernel cannot be locally free, because then the projective dimension of $\mathscr O\_Z$ at that closed point of $X$ would be $2$.


On the other hand, if your morphism is surjective, then what you want is true. Just count the rank of stalks.


