Consider the question: $$\frac{12}{2} \in \mathbb{Z}$$
Would you consider the above statement mathematically correct? and why?
I'm a bit on the side of calling it a true statement. However, since $\frac{12}{2}$ is equivalent to 6 but not exactly identical, I am quite skeptical.
Also, how about the case: $$\frac{12}{1} \in \mathbb{Z}$$
I checked this question Are all integers fractions?. it has some insight addressing a similar issue, yet some answers make it even more confusing for me.
Thank you!
TL;DR version: Yes, if you define $\mathbb{Q}$ properly and imbed $\mathbb{Z}$ into it.
Long version:
That depends on definitions.
To understand such cases, let's discuss the formal definition of the rational field $\mathbb{Q}$.
Let $R := \{(a,b) \mid a,b, \in \mathbb{Z}, b \neq 0\}$ be the set of all fractions. On $R$, we define a relation $\sim$ by saying $$(a,b) \sim (c,d) : \Leftrightarrow ad = bc$$ where we evaluate the last equation over the integers (as $a,b,c,d$ are all integers). Now one can show that $\sim$ is an equivalence relation, so we can look at the equivalence classes $R/\sim$. On these classes, which I will denote by $[a,b]$, we can define an addition and a multiplication as $$[a,b] + [c,d] := [ad + cb,bd]$$ $$[a,b] \cdot [c,d] := [ac,bd].$$
One now shows that
As $f$ is injective, we get that $\mathbb{Z}$ is isomorphic to its image in $\mathbb{Q}$, and thus we can identify it.
Returning to your first question: As $(12,2)$ and $(6,1)$ are in the same equivalence class, we have that $\frac{12}{2}$ lies in the image of $\mathbb{Z}$ under $f$ - and, if you allow to identify these, in $\mathbb{Z}$.
Note that the above construction does not only work for $\mathbb{Z}$ but for many other rings. There are even similar constructions for rings that are no integral domains (in this case the map $f$ is often not injective).