The answer to the first question is yes. Take $M=\Bbb{R}$, $N=S^1$, $E$ the Möbius bundle. The pullback of $E$ is trivial on $\Bbb{R}$.
In general, if $M$ is contractible, then the answer to this question tells us that all vector bundles on $M$ are trivial. Thus, it seems unlikely that there would be a good condition such that $f^*E$ being trivial implies that $E$ is trivial as well.
That said, the characterization of vector bundles in the answer to the linked question suggests that if $f$ is a homotopy equivalence, then $f^*E$ being trivial should imply $E$ is also trivial. While still a strong condition, it is much weaker than $f$ being a diffeomorphism.