The $p$-adic numbers form an integral domain provided that $p$ is prime.
Let's look at the $n$-adic numbers when $n$ is not prime.
Case $n = 10$
There are zero divisors. See this previous question.
Case $n = pq$ where $p$ and $q$ are coprime (not necessarily prime but not $1$).
There are also zero divisors. A similar construction works.
Case $n = p^k$ where $p$ is prime and $k > 1$
I have not figured this one out yet, not even the simplest case of $n = 4$. The construction in the previous question above does not work and I have not found an alternative yet. Looking at approximations in $\mathbb{Z}_4$, $\mathbb{Z}_{16}$, $\mathbb{Z}_{64}$, etc just leads me to zeros divisors ending in zeroes suggesting, but not proving, that there are none.
Note that I am using $\mathbb{Z}_n$ for the integers modulo $n$ and not the $n$-adic numbers. I think that I have seen it used for both. What is usual if you want discuss both at the same time?
Another previous question asks why $4$-adic numbers are not possible. The answer seems to be that they are possible but a norm cannot be defined. So, it leaves the existence of zero divisors open.
Are there zero divisors in the $4$-adic numbers? Are there idempotents in the $4$-adic numbers?
I have not looked at $9$-adic or other prime powers yet.
Please don't answer directly but some hints would be appreciated.