In general, I am wondering that if we have some $x\equiv y \implies f(x) = f(y)$, can we promote $x \equiv y$ to $x=y$, as long as we "promise" to only discuss functions that respect this property?
This seems to be the case for the construction of the integers as equivalence classes in $\mathbb{N} \times \mathbb{N}$. We define an equivalence relation first, and with the knowledge that, even though two elements from, say, $1 = [(1,0)]$ (such as $(1,0)$ and $(2,1)$, for instance) are unequal ordered pairs, they are equal in the sense that the arithmetic operations that we build on these notions will not discriminate between equivalent elements.
Then it seems like equality is a sort of context-dependent equivalence relation, and the choice to write $x = y$ rather than $x\equiv y$ may simply just be a matter of taste, in some cases. It may be the case that my understanding of equality is correct, in which case I would still be grateful for additional insight.
Short answer: Yes, you can. And this is what working mathematicians actually do, in the vast majority of cases, using a sensible abuse of notation to avoid pedantry.
Long answer: In the following, I'll be pedantic on purpose, to justify the fact that we can get rid of pedantry and, under appropriate conditions, lift the equivalence relation $\equiv$ to an equality $=$. To avoid too abstract generality, let's see a concrete example. Consider the construction of $\mathbb{Z}$ as the partition set generated by the following equivalence relation on $\mathbb{N} \times \mathbb{N}$: $(a,b) \equiv (c,d)$ if and only if $a+_\mathbb{N} d = c +_\mathbb{N} b$.
In such a context, we can define a function $+_\mathbb{Z}' \colon \mathbb{N} \times \mathbb{N} \to \mathbb{N} \times \mathbb{N}$ (acting on the elements of $\mathbb{N} \times \mathbb{N}$) such that \begin{align} (a,b) +_\mathbb{Z}' (c,d) = (a +_\mathbb{N} c, b +_\mathbb{N} d). \end{align}
It is immediate to prove that $+_\mathbb{Z}'$ is compatible with $\equiv$, i.e. it preserves equivalences classes: if $(a,b) \equiv (a',b')$ and $(c,d) \equiv (c',d')$ then $(a,b) +_\mathbb{Z}' (c,d) \equiv (a',b') +_\mathbb{Z}' (c',d')$ (indeed, $a + c + b' + d' = a' + c' + b + d$). Therefore, it is natural to lift $+_\mathbb{Z}'$ to a function $+_\mathbb{Z} \colon \mathbb{Z} \to \mathbb{Z}$ (acting on the equivalence classes of $\mathbb{N} \times \mathbb{N}$) defined by \begin{align} [(a,b)] +_\mathbb{Z} [(c,d)] = [(a+_\mathbb{N} c,b+_\mathbb{N} d)]. \end{align} Is this operation well-defined? Said differently, if we take different representatives of the same equivalence class, do we get the same result (as an equivalence class)? The compatibility condition above gives us a positive answer, i.e. the definition of $+_\mathbb{Z}$ does not depend on the choice of the representative of the equivalence classes: if $[(a,b)] = [(a',b')]$ and $[(c,d)] = [(c',d')]$ then $[(a,b)] +_\mathbb{Z} [(c,d)] = [(a',b')] +_\mathbb{Z} [(c',d')]$. Thus, it is perfectly legitimate to collapse $+_\mathbb{Z}'$ and $+_\mathbb{Z}$.
Suppose now that you only work on $\mathbb{N} \times \mathbb{N}$ with functions and relations defined on $\mathbb{N} \times \mathbb{N}$ that respect the compatibility condition. In such a context, it is impossible to distinguish $(1,0)$ and $(2,1)$, and more in general two distinct representatives of the same equivalence class. Therefore, in such a context, it is perfectly legitimate to collapse $\equiv$ (the equivalence relation on $\mathbb{N} \times \mathbb{N}$) and $=$ (seen as the equality on $\mathbb{Z}$), in accordance with Leibniz's logical principle of identity of indiscernibles: if two objects have the same properties, then they are identical. The fact that $(1,0)$ and $(2,1)$ are distinct ordered pairs does not matter as long as your are in a context where you cannot appreciate this difference, i.e. as long as you work only with functions and relations on $\mathbb{N} \times \mathbb{N}$ that are compatible with the equivalence relation $\equiv$.