Local versus global embedding dimension

It seems there is a counterexample. This is based on Jason Starr's suggestion in the comments.

If we have a surface $S$ with two smooth disjoint curves $C_1$ and $C_2$, which are isomorphic, and let $X$ be obtained by gluing $C_1$ and $C_2$ along that isomorphism $i: C_1\to C_2$, then $X$ is projective if there is an ample line bundle on $X$ whose restrictions to $C_1$ and $C_2$ are equal (under $i$).

$X$ has singularities locally isomorphic to a nodal curve cross a smooth curve, thus has local embedding dimension $3$. Can $X$ be embedded as a hypersurface in a smooth $3$-fold? If so, then by (part of) Jason Starr's obstruction, the sheaf

$$\mathcal{Ext}^1_{\mathcal O_X} (\Omega_{X/k}, \mathcal I)= \mathcal{Ext}^1_{\mathcal O_X} (\Omega_{X/k}, \mathcal O_X) \otimes \mathcal I$$ must be globally generated, where $\mathcal I$ is the conormal line bundle. This sheaf is clearly supported on the glued curve $C$, and we can calculate that it is isomorphic to $\mathcal I $ tensored with the normal bundle of $C_1$ and the normal bundle of $C_2$ there. (It suffices to work, carefully, locally in $k[x,y]/xy$, where $\Omega$ is generated by $dx$ and $dy$ with relation $xdy+ ydx=0$ and the generator of the $\mathcal{Ext}^1$ is precisely the linear map that sends $xdy+ydx$ to $1$, which the automorphism group acts on the same way it acts on the tensor rpoduct of the normal bundles.)

So for this sheaf to have a nonvanishing section, the conormal bundle $\mathcal I$ of $X$, restricted to $C$ must be isomorphic to the tensor product of the conormal bundle of $C_1$ to the conormal bundle of $C_2$.

So here's what we're going to do. We will take $E_1$ and $E_2$ two distinct, but isomorphic, elliptic curves in $\mathbb P^1$. In fact, we will take them to be two isomorphic curves appearing in the Dwork family, so their intersection points will be $3$-torsion. We will blow up all $9$ intersection points, plus two points $P_1, Q_1$ on $E_1$ and two points $P_2, Q_2$ on $E_2$. We choose $P_1, Q_1, P_2, Q_2$ very general, subject to the condition that $i(P_1) + 2i(Q_1) = P_2 + 2 Q_2$ in the group law on $E_2$.

To make our ample class, we'll just take a sufficiently high multiple of the hyperplane class, minus the sum of the exceptional divisors at all $9$ intersection points, minus the exceptional divisors over $P_1$ and $P_2$, minus twice the exceptional divisors over $Q_1$ and $Q_2$. Because of our assumption on the group law, this restricts to the same line bundle on $E_1$ and $E_2$, as each exceptional divisor corresponds to that point in the Picard group.

However, the Picard class of the tensor product of the two conormal bundles on $E_2$ will be some multiple of the hyperplane class, plus twice the sum of all the $3$-torsion points, plus $i(P_1) + i(Q_1) + P_2 + Q_2$. If this class comes from a global line bundle, then it must come from a sum of hyperplane classes and exceptional divisors, which means (projecting to Pic) it must come from a sum of $3$-torsion points, $P_2$ and $Q_2$. The exceptional divisors over $P_1$ and $Q_1$ don't contribute because they don't intersect $E_2$. Thus, it can only happen if we have some relation that $i(P_1) + i(Q_2) = a P_2 + b Q_2$ for $a,b\in \mathbb Z$, up to $3$-torsion. But there are countably many such relations, and none of them is forced by our condition on $P_1,P_2, Q_1,Q_2$, so none of them will hold for our very general choice.