For these kinds of questions, if you can see how to establish an isomorphism stalkwise, the key thing you need to do to promote this to a complete proof is to construct a morphism between the sheaves that you are trying to prove are isomorphic.
Once you have a morphism, in order to check that it is an isomorphism, you can work on stalks; and then hopefully the induced morphism equals to isomorphism you've already constructed. (If what you've done is sufficiently natural, then this should work out). In this particular case, there's likely an argument that avoids working with stalks altogether, but since you've already thought about them, it makes sense to incorporate them into your argument; and in any case, the strategy I'm suggesting is a very common one.
So, you want a natural morphism $f^*(\mathscr E^{\vee}) \to (f^*\mathscr E)^{\vee}$
(intuiting the correct direction in which to construct the desired morphism is one of the subtleties of this proof strategy, but can normally done by a bit of trial-and-error).
That is, we need a pairing $$f^*(\mathscr E^{\vee}) \times f^*\mathscr E \to \mathscr O_X,$$ or equivalently a morphism $$f^*(\mathscr E^{\vee}) \otimes_{\mathcal O_X} f^*\mathscr E \to \mathscr O_X.$$ (Judicious unwinding of definitions, as in this case, where I've unwound the definition of $(f^*\mathscr E)^{\vee})$, is also a typical aspect of such an argument.)
But just using properties of pull-backs and tensor products, you can see that there is a canonical isomorphism
$$f^*\mathscr E^{\vee}\otimes_{\mathscr O_X} f^*\mathscr E \cong f^*(\mathscr E^{\vee} \otimes_{\mathscr O_Y} \mathscr E).$$
So the desired morphism can be obtained by pulling back the canonical morphism
$$\mathscr E^{\vee} \otimes_{\mathscr O_Y} \mathscr E \to \mathscr O_Y$$ via $f$.
Now that you have a morphism from $f^*(\mathscr E^{\vee})$ to $(f^*\mathscr E)^{\vee}$, you can pass to stalks to check it is an isomorphism. But on stalks,
it will surely agree with the isomorphism you've already discovered (since this is the only natural isomorphism in this context).
The idea is to interpret the sheaf of section of the bundle $E$ as the locally free sheaf you mean. Since $E$ is a vector bundle, over small enough $U \subset Y$, $E|_U \simeq U \times k^n$, and the sections of the bundle $U \times k^n \to U$ correspond exactly to maps $U \to k^n$, whence we get isomorphism with $\mathcal{O}_U^n$.
Turning locally free sheaf $\mathcal{E}$ into a vector bundle $E \to Y$ is similarly simple: if our sheaf is free over each of $U_i$, and $\bigcup U_i = Y$, then we just need to glue $U_i \times k^n \to U_i$ over various $U_i$. Therefore, we need a family of gluing isomorphisms $u_{ij}: (U_i \cap U_j) \times k^n \to (U_j \cap U_i) \times k^n$.
Here's how we get them: we have local isomorphism $f_i: \mathcal{E}_{U_i} \to \mathcal{O}_{U_i}^n$ from the definition of "locally free". Restricting to intersection $U_i \cap U_j$, we get $f_{ij} = f_j|_{U_i \cap U_j} \circ f_i|_{U_i \cap U_j}^{-1}: \mathcal{O}_{U_i}^n|_{U_i \cap U_j} \to \mathcal{O}_{U_j}^n|_{U_i \cap U_j}$. Every such map is induced by a map $u_{ij}: (U_i \cap U_j) \times k^n \to (U_j \cap U_i) \times k^n$ (why?), and this is our gluing isomorphism.
Best Answer
If you take a general ringed space, this can be wrong. Take $R$ a ring which has a module $M$, that is not free, but which has an inverse $N$ with respect to the tensor product.
Now take $X=\{x\}$ just a single point. Thus sheaves in sets/rings/modules are just equivalent to sets/rings/modules... Now take the structure sheaf given by $R$ and sheaf given by $M$. Then obviously $M$ is invertible (with inverse $N$). But $M$ is not free and since your space $X$ is just a point, it is also not locally free.