Suppose by absurd that the characteristic of an integral domain is an integer $n$ not prime, say $n=n_1 \cdot n_2$.
Now we have $$na=(n_1 \cdot n_2)a=0 \implies (n_1 \cdot a) \cdot (n_2 \cdot a)=0 \implies n_1 \cdot a=0 \space \lor n_2 \cdot a=0$$
In my book it is considered a contradiction (for the minimality of $n$) but a priori it could be possible that $n_1$ and $n_2$ don't satisfy characteristic property.
Adopted definition of characteristic of an integral domain (with $charD \neq 0$):
$$charD := min \{n \in \mathbb{N}| \space n \cdot a=0 \space \forall a \in D\}$$
In my book an integral domain is a commutative ring without non-zero zero divisors. I do not assume identity.
You've shown that for every element $r\in R$, $n_1r=0$ or $n_2r=0$.
You can check that $I_1=\{x\mid n_1x=0\}$ and $I_2=\{x\mid n_2x=0\}$ are additive subgroups of $R$, and moreover by your discovery above, $R=I_1\cup I_2$.
But a group is never a union of two proper subgroups, so one of them is in fact all of $R$. That contradicts the minimality of $n$.
If your book considers it a contradiction without resolving this detail, then I think it is highly likely your book assumes an integral domain has an identity. In that case, you can conclude the proof much more simply. Suppose $n$ is the additive order of $1$. Then obviously $n\cdot x=(n\cdot 1)\cdot x=0$ for every $x\in R$. If $n$ is were composite, $n_1n_2\cdot 1=(n_1\cdot 1)(n_2\cdot 1)=0$, at which point we would have to conclude one of the factors is zero... but that would contradict the minimality of $n$ as the additive order of $1$.