In the proof of Theorem "The characteristic of an integral domain is either prime or zero" everyone assumed at first characteristics of ring $n = ab$. then try to prove n is not composite. My concern is if we write $n =ab$ it also means n is also an element of the ring by closure property.
But We have seen that ring like $\mathbb{Z}6$ or $\mathbb{Z}7$ their characteristics are not included as the element of ring. Even though $\mathbb{Z}6$ or $\mathbb{Z}7$ etc they are not integral domain but for the general case of shouldn't we assume $n$ could be out of the set of the ring? Or we should prove at first every integral domain characteristics ring is an element of the ring?
Your question doesn't really make sense. For every commutative ring with $1$, call it $A$, we have a unique ring homomorphism $\mathbb{Z} \to A$. Then when for $n \in \mathbb{Z}$ we refer to $n$ as an element of $A$, we implicitly assume the image of $n$ under this homomorphism. In other words, when we refer to $5$ as an element of $A$, we implicitly mean $1 + 1 + 1 + 1 + 1$, where $1$ is the unit of $A$. So there is no question of whether $5$ is in $A$ or not, just the definition as I explained. So $n$ means $1$ plus itself $n$ times, whatever this gives in $A$.
Hope this is clear.