Let $\mathcal{L}$ be an invertible sheaf on a quasicompact scheme $X$. I want to prove that there exists an epimorphism $\mathcal{O}_{X}^{\oplus I}\rightarrow\mathcal{L}$ if and only if for any point $p\in X$ there exists a global section of $\mathcal{L}$ not vanishing at $p$.
In the page 121 of Hartshorne's book it is claimed that if there exists an epimorphism $\mathcal{O}_{X}^{\oplus I}\rightarrow\mathcal{L}$ then there exists a family of global sections $\{s_{i}\}_{i\in I}$ of $\mathcal{L}$ such that $\mathcal{L}_{p}$ is generated by $\{s_{i,p}\}_{i\in I}$ as $\mathcal{O}_{X,p}$-module for every $p\in X$.
The first implication easily follows from this fact, but I am not able to prove the fact, nor the other implication.
May be quasi-compact is enough, but I will assume Noetherian for one direction.
If you had $\mathcal{O}_X^l\to \mathcal{L}$ a surjection and $p$ any point, we have a surjection $\mathcal{O}_{X,p}\to\mathcal{L}_p$ is onto. But the latter is a one dimensional vector space over $k(p)$ and thus at least one of the sections from $\mathcal{O}_X^l$ must be non-zero at $p$ proving the result in one direction.
For the reverse direction, if $p$ is any point, you have a section not vanishing at $p$ and then this section will not vanish at any point in a neighbourhood of $p$. Now, take any point outside this open set and then exactly as before, we have a section not vanishing in a neighbourhood of this point. So, these two sections together do not vanish at any point in the union of these two open sets. Now, I hope you see how Noetherianness would give you finitely many sections, which together do not vanish at any point. This implies there is a surjection as desired, since $\mathcal{L}$ is invertible, so locally one generated.