There are several definitions running around, confusing people like you when you read from different sources. For some of them the answer is "Yes", for some the answer is "no".
Some definitions of unital rings wouldn't consider $\{0\}$ a ring at all, since they require that the multiplicative identity is distinct from the additive one. Disregarding that, a subring is a subring by virtue of the inclusion homomorphism, and some sources require that ring homomorphisms preserve the multiplicative identity. In that case, $\{0\}$ is all by itself without any homomorphisms of any kind to any other ring, so it's not included in any other ring either. However, that's usually unporoblematic since these two definitions often come together (so if your definition of homomorphisms would make $\{0\}$ sit alone, your definition of ring would make it not a ring at all).
So, if we let $\{0\}$ be a ring, and we don't require homomorphisms to treat the multiplicative identity with any more care than any other element, then yes, you can include $\{0\}$ into bigger rings and have it be a subring. The same way you can include $\Bbb Z$ as the first component of $\Bbb Z\times \Bbb Z$, for instance.
When I first learned about rings, I prefered the more relaxed requirements, because I thought they made life easier. These days I prefer the stricter requirements because I feel that they make life easier (knowing that the image of $1$ is $1$, and not just any idempotent element really helps some arguments, for instance).
Note that if your definition of rings requires a multiplicative identity to exist in any ring, then you will most likely be in the stricter domain (requiring $1$ to exist means it is nice if we require homomorphisms to respect it). The more relaxed domain typically doesn't require a multiplicative identity to exist in rings (although, of course, some rings happen to have one).
Best Answer
Consider the embedding $2\mathbb{Z}\to\mathbb{Z}$. The inverse image of the codomain, which is unital, is the whole domain, which is not unital.
If you want a surjective homomorphism, consider the trivial homomorphism $R\to\{0\}$. The codomain is unital, but the domain may not be.