Let $\mathcal I$ be the quasi-coherent ideal sheaf cutting out $Z$, so that
we have a s.e.s. $$0 \to \mathcal I \to \mathcal O_X \to \mathcal O_Z \to 0,$$
and hence a s.e.s of stalks
$$0 \to \mathcal I_x \to \mathcal O_{X,x} \to \mathcal O_{Z,x} \to 0$$
for all points $x \in X$.
To say that $x \in Z$ is to say that $\mathcal O_{Z,z} \neq 0$, or that
$\mathcal I_z$ is a proper ideal in $\mathcal O_{X,z}$.
An open subset $U$ of $X$ is contained in $Z$ as an open subscheme
(i.e. the underlying set of $U$ is contained in the underlying set of $Z$, and the scheme structure on $U$ is the one induced by regarding it as an open
subscheme of $Z$) iff $\mathcal I_{| U} = 0.$ (Thanks to Alex Youcis for pointing out this subtlety in a comment below.)
So we are given that the stalk $\mathcal I_z = 0$, and we want to conclude
that there is a n.n. $U$ of $z$ such that $\mathcal I_{| U } = 0$.
Suppose that $\mathcal I$ is locally f.g., i.e. that each point (in particular $z$) has a n.h. $V$ so that over $V$ we may find a surjection $\mathcal O_V^n \to \mathcal I_{| V}$, for some $n$.
Then our assumption is that the stalk of this morphism at $z$ is zero, and then
we may shrink $V$ to some n.n. $U$ of $z$ so that this morphism becomes zero. (This is where we use the f.g. of $\mathcal I_{| V}$: each generator vanishes in the stalk at $z$, and hence in some n.h. of $z$; since there are only finitely many generators, we may intersect these n.h. to find a n.n. that kills all the generators, and hence s.t. $\mathcal I$ restricts to $0$.)
Conclusion: If $\mathcal I$ is loc. f.g. (e.g. if $X$ is locally Notherian),
then the statement is true.
It need not be true in general. E.g. if $$A = k[x_1,y_1,x_2,y_2,\ldots, x_n,y_n, \ldots]/(x_1y_1,x_2 y_2,\ldots, x_n y_n, \ldots),$$
and $I = (x_1 , x_2,\ldots, x_n, \ldots),$ which is a prime ideal in $A$,
and $z$ is the point of Spec $A$ corresponding to $I$, and $\mathcal I$ is the associated ideal sheaf (so $Z$ is just the closure of $z$), then $\mathcal I_z = 0$, but $Z$ contains no open n.h. of $z$ in $X$.
You can see the picture here pretty easily: Spec $A$ is a product of infinitely many copies of two lines crossing (i.e. $xy = 0$), and $Z$ is the product of infinitely many copies of one of the two lines (i.e. $x = 0$).
If there were only finitely many (say $n$) copies, then $Z$ would be one of the $2^n$ irred. components of $X$, and would contain a non-empty open subset of $X$ (which would then be the desired n.h. of its generic point $z$); e.g. take a product of $n$ copies of the punctured lines $x = 0, y \neq 0$.
But this breaks down when we take the infinite product (basically b/c an infinite product of non-empty proper opens is not open in an infinite product).