As Piotr remarks, these kind of questions quickly lead to studying reflexive sheaves. I would add that one also better get acquainted with Serre's condition $S_2$. For more on this see
this and this MO answers.

Perhaps the first remark is that besides the singularities of the surface $X$ you also have to take into account the singularities of the sheaf you are considering.

You are asking about normal surfaces. Normal implies $S_2$ and pretty much everything that follows is OK for $S_2$ in arbitrary dimensions.

A coherent sheaf on an open set can always be extended as a coherent sheaf on the ambient space. Furthermore if $X$ is $S_2$ and $j:U\hookrightarrow X$ is an open set such that $\mathrm{codim}_X(X\setminus U)\geq 2$, then a coherent sheaf $\mathscr F$ on $X$ such that $\mathscr F|_U$ is locally free is *reflexive* if and only if $$\mathscr F \simeq j_*(\mathscr F|_U).$$
Notice that this means that if $X$ is $S_2$, then a locally free sheaf $\mathscr E$ on $U$ can be extended as a locally free sheaf to $X$ if and only if $j_*\mathscr E$ is locally free. (The point is, that since $X$ is $S_2$, $j_* \mathscr E$ is reflexive and if there is a locally free sheaf extending $\mathscr E$, then that is also a reflexive sheaf which agrees with $j_*\mathscr E$ on an open set with at least codimension $2$ complement, so they have to agree).

This also tells you how to produce locally free sheaves that cannot be extended as a locally free sheaf: Take any reflexive sheaf that is not locally free, then take the open set where it is locally free. By the above, this sheaf on that open set is a locally free sheaf that does not have an extension as a locally free sheaf on the ambient space. Piotr's example is probably the simplest such sheaf.

So now the question is: When is a reflexive sheaf locally free?

In some contexts one defines the *singularity set* of a coherent sheaf $\mathscr F$ as the locus where it is not locally free. Then there are various results that say that the singularity set of certain sheaves have to be at least such and such codimension. Here is a short list of those:

**Sample statement**: If $\mathscr F$ is *bluh*, then the singularity set of $\mathscr F$ has codimension at least *boo*.

**Actual statement** If $X$ is smooth, we can substitute the following into the above sentence:

- If
*bluh* = *coherent*, then *boo* = $1$.
- If
*bluh* = *torsion-free*, then *boo* = $2$.
- If
*bluh* = *reflexive*, then *boo* = $3$.

You may recognize theorems that you know as simple consequences of these:

**Thm 1** For any coherent sheaf there exists a non-empty open set on which it is (locally) free.

*Remark* You may also note that this does not require $X$ smooth, but that's essentially because the conclusion is invariant under first restricting to the open set where $X$ is smooth.

**Thm 2** A torsion-free sheaf on a smooth curve is locally free.

*Remark* We know that this fails if the variety is either not smooth or has dimension at least $2$.

**Thm 3** A reflexive sheaf on a smooth surface is locally free.

*Remark* This is the reason why the statement you mention at the start is true. If $X$ is a smooth surface, then a sheaf that's locally free on the complement of finitely many points pushes forward to a reflexive sheaf which by this theorem has to be locally free.
Piotr's example or any Weil divisor that's not Cartier shows that this fails if the surface is not factorial. (Meaning that every local ring is a UFD. This is a weaker condition than being smooth.) It is also true that a reflexive sheaf of rank $1$ on a smooth variety is always locally free, so you need to go to higher ranks to get a counter-example.

To complete the picture here is an example of a reflexive sheaf on a smooth $3$-fold that is not locally free.

**Example** Consider the Euler sequence of $\mathbb P^3$:
$$
0\to \mathscr O_{\mathbb P^3}\to \bigoplus_{i=0}^3 \mathscr O_{\mathbb P^3} (1) \to
T_{\mathbb P^3} \to 0
$$
and consider (one of) the induced maps
$$
\alpha: \mathscr O_{\mathbb P^3} (1) \to T_{\mathbb P^3}.
$$
This is clearly injective and let the cokernel of $\alpha$ be $\mathscr F$.
The original (Euler) sequence shows that $\alpha$ cannot be a vector bundle embedding and hence $\mathscr F$ cannot be locally free. I leave it for you to prove that it is reflexive. (This is not absolutely trivial, but it is a good exercise).

So, to answer your question, the statement you cite is not true for singular varieties, at least not in the way it is stated. You can cook up some versions that work by adding additional assumptions. In any case, these are likely the notions that will help you do that.

Finally, here are some references:

- On reflexive sheaves I would recommend Hartshorne's series of papers
*Stable reflexive sheaves I-II-III*.
- You can read about the singularity set and other interesting stuff in Chapter 2 of Okonek-Schneider-Spindler's
*Vector bundles on complex projective spaces*