$\newcommand\abs[1]{\lvert#1\rvert}$Let $(X,d_X)$ be a countable metric space such that $X\cap\mathbb Z=\{0\}$.
Problem. Is there a metric $d$ on the union $Y=X\cup\mathbb Z$ such that
$d(x,y)=d_X(x,y)$ for all $x,y\in X$;
$d(n,m)=\abs{n-m}$ for all $n,m\in\mathbb Z$;
$d(x,y)\notin d_X[X^2]\cup\mathbb N$ for any points $x\in X\setminus\mathbb Z$ and $y\in\mathbb Z\setminus X$;
for any distinct pairs $(x,y),(x',y')\in (X\setminus\mathbb Z)\times(\mathbb Z\setminus X)$ we have $d(x,y)\ne d(x',y')$?
So, the problem is to find an extension of the metrics of the spaces $X$ and $\mathbb Z$ to a metric on the union $X\cup\mathbb Z$ so that all distances between points of the sets $X\setminus \mathbb Z$ and $\mathbb Z\setminus X$ are pairwise distinct and do not belong to the set $d_X[X^2]\cup\mathbb N$.
Remark. If $r:=\inf (d_X[X^2]\setminus\{0\})>0$, then a desirable metric $d$ on $X\cup\mathbb Z$ can be defined by the formula $$d(x,y)=\begin{cases} d_X(x,y)&\text{if $x,y\in X$;}\\ \abs{x-y}&\text{if $x,y\in \mathbb Z$;}\\ d_X(x,0)+\abs y-\varepsilon_+(x)&\text{if $x\in X\setminus\{0\}$ and $y\in \mathbb N$;}\\ d_X(x,0)+\abs y-\varepsilon_-(x)&\text{if $x\in X\setminus\{0\}$ and $y\in -\mathbb N$;}\\ d_X(y,0)+\abs x-\varepsilon_+(y)&\text{if $x\in \mathbb N$ and $y\in X\setminus\{0\}$;}\\ d_X(y,0)+\abs x-\varepsilon_-(y)&\text{if $x\in -\mathbb N$ and $y\in X\setminus\{0\}$} \end{cases} $$ for suitable injective functions $\varepsilon_+,\varepsilon_-:X\to (0,r)$ such that $\varepsilon_\pm(x)< \varepsilon_\pm(y)$ for any points $x,y\in X$ with $d_X(0,x)< d_X(0,y)$.
Added in Edit. However, the general case seems to be still open.