Assume we have a flat morphism $f: X\rightarrow Y$ of schemes such that $f_{*}O_X=O_Y$. Given a locally free sheaf $E$ of finite rank, the projection formula gives $f_{*}f^{*}E=f_{*}(O_X\otimes f^{*}E)=f_{*}O_X\otimes E=E$.
Using the flatness of $f$, can we replace locally free of finite rank by coherent or quasi coherent?
This is indicated in this answer, but I don't see how to use the flatness of $f$ to prove such a result.
Any advice on how to see this is appreciated. Maybe this can be translated in a commutative algebra question which is easier? References are also welcome.