2 added 9 characters in body

Let me try to give a counterexample. (I don't know whether it is 'nice'). First, let us rewrite your properties for an affine scheme $X=Spec(A)$.

Connectedness for $A$ means $A$ has no nontrivial idempotents;

Integrality for $A$ is the usual one ($A$ is a domain);

Local integrality means that whenever $fg=0$ in $A$, every point of $X$ has a neighborhood where either $f$ or $g$ vanishes.

Let us construct a connected locally integral ring that is not integral.

Roughly speaking, the construction is as follows: let $X_0$ be the cross (the union of coordinate axes) on the affine plane. Then let $X_1$ be the (reduced) full preimage of $X_0$ on the blow-up of the plane ($X_1$ has three rational components forming a chain). Then blow up the resulting surface at the two singularities of $X_1$, and let $X_2$ be the reduced preimage of $X_1$ (which has five rational components), etc. Take $X$ to be the inverse limit.

The only problem with this construction is that blow-ups glue in a projective line, so $X_1$ is not affine. Let us correct this by gluing in an affine line instead (so our scheme will be an open subset in what was described above).

Here's an algebraic description:

For every $k\ge 0$, let $A_k$ be the following ring: its elements are collections of polynomials $p_i\in C[x]$ p_i\in{\mathbb C}[x]$where$i=0,\dots,2^k$such that$p_i(1)=p_{i+1}(0)$. Set$X_k=Spec(A_k)$.$X$is a union of$2^k+1$affine lines that meet transversally in a chain. (It may be better to index polynomials by$i/2^k$, but the notation gets confusing.) Define a morphism$A_k\to A_{k+1}$by $$(p_0,\dots,p_{2^k})\mapsto(p_0,p_0(1),p_1,p_1(1),\dots,p_{2^k})$$ (every other polynomial is constant). This identifies$A_k$with a subring of$A_{k+1}$. Let$A$be the direct limit of$A_k$(basically, their union). Set$X=Spec(A)$. For every$k$, we have a natural embedding$A_k\to A$, that is, a map$X\to X_k$. Each$A_k$is connected but not integral; this implies that$A$is connected but not integral. It remains to show that$A$is locally integral. Take$f,g\in A$with$fg=0$and$x\in X$. Let us construct a neighborhood of$x$on which one of$f$and$g$vanishes. Choose$k$such that$f,g\in A_{k-1}$(note the$k-1$index). Let$y$be the image of$x$on$X_k$. It suffices to prove that$y$has a neighborhood on which either$f$or$g$(viewed as functions on$X_k$) vanishes. If$x$y$ is a smooth point of $X_k$ (that is, it lies on only one of the $2^k+1$ lines), this is obvious. We can therefore assume that $x$ y$is one of the$2^k$singular points, so two components of$X_k$pass through$x$. y$. However, on one of these two components (the one with odd index), both $f$ and $g$ are constant, since they are pullbacks of functions on $X_{k-1}$. Since $fg=0$ everywhere, either $f$ or $g$ (say, $f$) vanishes on the other component. This implies that $f$ vanishes on both components, as required.

1

Let me try to give a counterexample. (I don't know whether it is 'nice'). First, let us rewrite your properties for an affine scheme $X=Spec(A)$.

Connectedness for $A$ means $A$ has no nontrivial idempotents;

Integrality for $A$ is the usual one ($A$ is a domain);

Local integrality means that whenever $fg=0$ in $A$, every point of $X$ has a neighborhood where either $f$ or $g$ vanishes.

Let us construct a connected locally integral ring that is not integral.

Roughly speaking, the construction is as follows: let $X_0$ be the cross (the union of coordinate axes) on the affine plane. Then let $X_1$ be the (reduced) full preimage of $X_0$ on the blow-up of the plane ($X_1$ has three rational components forming a chain). Then blow up the resulting surface at the two singularities of $X_1$, and let $X_2$ be the reduced preimage of $X_1$ (which has five rational components), etc. Take $X$ to be the inverse limit.

The only problem with this construction is that blow-ups glue in a projective line, so $X_1$ is not affine. Let us correct this by gluing in an affine line instead (so our scheme will be an open subset in what was described above).

Here's an algebraic description:

For every $k\ge 0$, let $A_k$ be the following ring: its elements are collections of polynomials $p_i\in C[x]$ where $i=0,\dots,2^k$ such that $p_i(1)=p_{i+1}(0)$. Set $X_k=Spec(A_k)$. $X$ is a union of $2^k+1$ affine lines that meet transversally in a chain. (It may be better to index polynomials by $i/2^k$, but the notation gets confusing.)

Define a morphism $A_k\to A_{k+1}$ by $$(p_0,\dots,p_{2^k})\mapsto(p_0,p_0(1),p_1,p_1(1),\dots,p_{2^k})$$ (every other polynomial is constant). This identifies $A_k$ with a subring of $A_{k+1}$. Let $A$ be the direct limit of $A_k$ (basically, their union). Set $X=Spec(A)$. For every $k$, we have a natural embedding $A_k\to A$, that is, a map $X\to X_k$.

Each $A_k$ is connected but not integral; this implies that $A$ is connected but not integral. It remains to show that $A$ is locally integral.

Take $f,g\in A$ with $fg=0$ and $x\in X$. Let us construct a neighborhood of $x$ on which one of $f$ and $g$ vanishes. Choose $k$ such that $f,g\in A_{k-1}$ (note the $k-1$ index). Let $y$ be the image of $x$ on $X_k$. It suffices to prove that $y$ has a neighborhood on which either $f$ or $g$ (viewed as functions on $X_k$) vanishes.

If $x$ is a smooth point of $X_k$ (that is, it lies on only one of the $2^k+1$ lines), this is obvious. We can therefore assume that $x$ is one of the $2^k$ singular points, so two components of $X_k$ pass through $x$. However, on one of these two components (the one with odd index), both $f$ and $g$ are constant, since they are pullbacks of functions on $X_{k-1}$. Since $fg=0$ everywhere, either $f$ or $g$ (say, $f$) vanishes on the other component. This implies that $f$ vanishes on both components, as required.