The function $f(x)=\frac{\sin(e^x)}{1+x^2}$ has derivative $\frac{e^x\cos(e^x)(1+x^2)-2x\sin(e^x)}{(1+x^2)^2}$, which is clearly unbounded.
Yet, $f$ is uniformly continuous as for $f(x)-f(y)$ to be $\ge \epsilon$, we clearly need at least one of $|f(x)|, |f(y)|$ to be $\ge \frac\epsilon2$, hence $|x|$ or $|y|$ must be $\le\sqrt{ \frac2\epsilon-1}$, so we may essentially consider $f$ on a compact interval.
EDIT: To elaborate, I'll give an explicit proof of uniform continuity - the above short argument seems to have been ambiguous.
Let $\epsilon>0$ be given.
We are looking for $\delta>0$ such that for all $x,y$ with $|x-y|<\delta$ we have $|f(x)-f(y)|<\epsilon$.
Let $\epsilon_1=\min\{\epsilon,1\}$
and $L=1+\sqrt{\frac2{\epsilon_1}-1}$. Then $L\ge2$.
The restriction $g\colon [-L,L]\to \mathbb R$, $x\mapsto f(x)$ of $f$ to the compact interval $[-L,L]$ is continuous and hence uniformly continuous.
Therefore, there exists $\delta_0>0$ such that for all $x,y\in[-L,L]$ with $|x-y|<\delta_0$, we have $|g(x)-g(y)|<\epsilon$.
Let $\delta=\min\{\delta_0,1\}$.
Now if $x,y\in\mathbb R$ with $|x-y|<\delta$, I claim that $|f(x)-f(y)|<\epsilon$.
Indeed, if both $x,y$ are $\in[-L,L]$, then $|f(x)-f(y)|=|g(x)-g(y)|<\epsilon$ because $|x-y|<\delta\le\delta_0$.
If on the other hand one of $x,y$ has absolute value $>L$, then the other has absolute value $>L-\delta\ge L-1$, hence both $|x|,|y|$ are $>L-1=\sqrt{\frac2{\epsilon_1}-1}$.
This implies $x^2+1>\frac2{\epsilon_1}$, hence $|f(x)|<\frac{\epsilon_1}2$ because the sine is bounded by $1$. Since similarly $|f(y)|<\frac{\epsilon_1}2$, we find $|f(x)-f(y)|<|f(x)|+|f(y)|<\epsilon_1\le\epsilon$.
Thus in all possible cases $|f(x)-f(y)|<\epsilon$, as was to be shown.$_\square$
Finally, an explicit argument why $\frac{e^x\cos(e^x)(1+x^2)-2x\sin(e^x)}{(1+x^2)^2}$ is unbounded.
The inequality $e^t\ge1+t$ for all $t\in\mathbb R$ should be well-known.
It implies $e^t=(e^{t/3})^3\ge(1+\frac t3)^3$ for all $t\ge-3$.
Therefore, if $x\ge-3$ then
$$ \frac{e^x}{1+x^2}\ge \frac{1+x+\frac13x^2+\frac1{27}x^3}{1+x^2}=\frac{x}27+\frac13+\frac{26x+18}{27(x^2+1)}.$$
The last summand is bounded,hence the total expression is
$$ \frac{e^x}{1+x^2}\ge\frac{x}{27}+C$$
for some constant $C$.
Given $M\in\mathbb R$ (where without loss of generality, $M>C$), select an integer $k>\frac{e^{27(M-C)}}{2\pi}>0$ and let $x=\ln(2\pi k)\ge\ln(2\pi)>0$.
Then
$$f'(x)=\frac{e^x\cos(e^x)(1+x^2)-2x\sin(e^x)}{(1+x^2)^2} = \frac{e^x\cos(2k\pi)(1+x^2)-2x\sin(2k\pi)}{(1+x^2)^2} =\frac{e^x}{1+x^2} \ge \frac x{27}+C.$$
But $x=\ln(2\pi k)>27(M-C)$ then implies
$$ f'(x)>M.$$
Similarly, by letting $x=\ln((2k+1)\pi)$ we find $x$ with $f'(x)<-M$.
Thus $f'$ is neither bounded from above nor from below.$_\square$
If $f$ is uniformly continuous, and its domain $D$ is totally bounded, then $f$ must be a bounded function. So, to find the necessary counterexample, you need to be a little trickier...
Here is a counterexample:
Consider
$$
\begin{align}
f:(\mathbb R,d) &\to(\mathbb R,|\cdot|)\\
x &\mapsto x
\end{align}
$$
Where $d(\cdot,\cdot)$ is the metric defined by
$$
d(x,y)=
\begin{cases}
|x-y| & |x - y|<1\\
1 & |x-y|\geq 1
\end{cases}
$$
Then $f$ is uniformly continuous, its domain is bounded (but not totally bounded), and its image is unbounded.
Best Answer
Let us start with
$$h(x) = \begin{cases} \hphantom{-}4(x+2) &, -2\leqslant x < -\frac{3}{2}\\ -4(x+1) &, -\frac{3}{2} \leqslant x < -1\\ -4(x-1) &, \hphantom{-}\; 1 \leqslant x < \frac{3}{2}\\ \hphantom{-} 4(x-2) &, \hphantom{-}\frac{3}{2}\leqslant x < 2\\ \qquad 0 &, \hphantom{-} \text{ otherwise.} \end{cases}$$
For $c > 0$, let
$$h_c(x) = c\cdot h(c\cdot x).$$
Then $h_c$ is continuous, and $\int_{-\infty}^0 h_c(x)\,dx = 1$ as well as $\int_{-\infty}^\infty h_c(x)\,dx = 0$. Now let
$$g(x) = \sum_{n=1}^\infty h_{5^n}\left(x-n-\frac{1}{2}\right).$$
Every $g_n(x) = h_{5^n}\left(x-n-\frac12\right)$ vanishes identically outside the interval $[n,n+1]$, so $g$ is continuous, and
$$f(x) = \int_0^x g(t)\,dt$$
is well-defined and continuously differentiable.
Furthermore, $f(x) \equiv 0$ on every interval $\left[n, n+\frac{1}{2} - \frac{2}{5^n}\right]$, and $f(x) \equiv 1$ on every interval $\left[n+\frac{1}{2}-\frac{1}{5^n}, n+\frac{1}{2}+\frac{1}{5^n}\right]$. Thus on
$$X = \bigcup_{n=1}^\infty \left(\left[n, n+\frac{1}{2} - \frac{2}{5^n}\right] \cup \left[n+\frac{1}{2}-\frac{1}{5^n}, n+\frac{1}{2}+\frac{1}{5^n}\right]\right)$$
we have $f' \equiv 0$, so the derivative is bounded, but
$$f\left(n+\frac{1}{2}-\frac{1}{5^n}\right) - f\left(n+\frac{1}{2}-\frac{2}{5^n}\right) = 1$$
for all $n$, while the distance between the two points is $5^{-n}$ which becomes arbitrarily small, so $f$ is not uniformly continuous on $X$.
If the sentence
was meant to forbid a construction as above where $X$ is a disjoint union of intervals, we can obey the letter of the law (but not the spirit) by adding an arbitrary subset of $(-\infty,0)$ that is not a union of disjoint intervals.