Let $\mathcal{F}$ be a locally free sheaf on $X$. For any $x$ in $X$ there exists $x \in U \subset_{open} X $ such that
$\mathcal{F}|_U \cong \mathcal{O}_X|_U^{(I)}$ $ \ \ \ \ (\star)$.
In particular, for each $y$ in this particular $U$, one has $\mathcal{F}_y \cong \mathcal{O}_{X,y}^{(I)}$ (which is given by the isomorphism above!!!).
Suppose now $X$ is connected and $\mathcal{F}$ is locally free (we need this). Fix an indexing set $I$ (and I think I need to take this $I$ to be one of the indexing sets from $(\star)$ above). The properties of $\mathcal{F}$ show that the set
$S_I = \left(x \in X : \mathcal{F}_x \cong \mathcal{O}_{X,x}^{(I)}\right)$
is both closed and open in $X$. We know that there exists
$x$ in $X$ with $\mathcal{F}_x \cong \mathcal{O}_{X,x}^{(I)}$,
we have $S_I = X$.
In particular, $\text{rank}_{\mathcal{O}_{X,x}}(\mathcal{F}_x)$ is constant as $x$ varies in $X$.