Ravi gives a version of the claim below in exercise 24.4G in "Foundations...", but he adds the condition that $Y$ is reduced in order to conclude something additional (the equivalence of the condition $\pi_* O_X$ locally free to $\pi_* O_X$ locally constant rank).
However, I don't see where $Y$ reduced would be needed in the following claim.
Claim: If $ \pi : X \to Y$ is a finite morphism of locally Noetherian schemes. Then $\pi$ is flat iff $\pi_* O_X$ is locally free on $Y$.
Sketch of argument that pushforward locally free implies flat: We reduce to the affine case, since flatness can be checked on an open cover of the source and / or target. We further reduce to the case when these covers trivialize $\pi_* O_X$. But a free module is flat, so we can conclude.
I see no problem with this right now (and I did write out more details than what are above)... maybe I am missing something subtle or obvious? (Or maybe I am just being paranoid...)