Suppose that $X$ is a noetherian scheme such that $Z\subseteq X$ is a closed subscheme. Clearly $Z$ define an ideal sheaf $\mathscr I\subset\mathscr O_X$. Now let $z\in Z$ be a point such that it is a regular for $Z$ and $X$, then at the lever of stalks at $z$ we have the ideal: $$\mathscr J_{\!z}\subset\mathscr O_{X,z}$$
Is it true or not the following proposition?
$Z$ is irreducible implies that $\mathscr J_{\!z}$ is a prime ideal
What about the converse (for every $z\in Z$)?
Let me elaborate on my comment.
The easiest proof of your proposition is the following:
We have an exact sequence
$$0 \to \mathcal J \to \mathcal O_X \to \mathcal O_Z \to 0,$$
which induces an exact sequence at the stalk of $z \in Z$:
$$0 \to \mathcal J_z \to \mathcal O_{X,z} \to \mathcal O_{Z,z} \to 0.$$
Since $z$ is assumed to be a regular point of $Z$, we have that $\mathcal O_{Z,z}$ is a regular local ring, in particular an integral domain. Hence $\mathcal J_z$ is prime.
Note that the condition of $\mathcal J_z$ being prime is equivalent to $\mathcal O_{Z,z}$ being an integral domain, which is completely independent of $X$.
Further note that I have not used, that $Z$ is irreducible. The reason is that your assumption - $z \in Z$ is a regular point - is way too strong. The necessary and sufficient condition is that $z \in Z$ is a reduced point and is contained in a unique irreducible component of $Z$. Being a regular point implies both of this, but the converse is false: Consider the singular point of the curve $C := \{x^2=y^3\}$. It is singular, but the stalk is an integral domain, since $C$ is integral.
To the converse: If $\mathcal O_{Z,z}$ is an integral domain for all $z \in Z$, you cannot deduce that $Z$ is irreducible. As I said in the comments, you can just take two closed points, for instance $Z = \operatorname{Spec} K[x]/(x(x-1)) \subset \mathbb A^1$. The stalks at both points are fields, but $Z$ is not irreducible.
The intuition behind this is that the stalks cannot determine, what happens at other connected components.
This leads us to a positive result: If $\mathcal O_{Z,z}$ is an integral domain for all $z \in Z$, then each connected component of $Z$ is irreducible. The proof goes like this: Let $Y$ be a connected component of $Z$ and $Y=Y_1 \cup \dotsc \cup Y_n$ the irreducible components of $Y$. Assume $n \geq 2$. $Y$ is connected, hence the union cannot be disjoint, thus there is some $z$, which lies on two irreducible components. $\mathcal O_{Z,z}$ is not an integral domain, since it has at least $2$ minimal primes (the primes corresponding to the two irreducible components). Hence $n=1$ must hold.