I think you mean $\text{diam}(S)$ rather than $\text{dim}(S)$, these mean very different things. The usual definition of the diameter of a set in a metric space is
$$
\text{diam}(S)=\sup_{a,b\in S}d(a,b).
$$
Here the metric under consideration is $d(a,b)=|a-b|$, the Euclidean metric on $\mathbb R$.
To show that the two notions of boundedness are the same, we will show that (1) if $\text{diam}(S)<\infty$, then $S\subseteq [-M,M]$ for some $M\geq 0$, and (2) if $S\subseteq[-M,M]$, then $\text{diam}(S)<\infty$.
(1) Take any point $x\in S$. By definition of the diameter, $S\subseteq [x-\text{diam}(S),x+\text{diam}(S)]$. This, in turn, is contained in the interval $[-M,M]$ if we set $M=|x|+\text{diam}(S)$.
(2) If $S\subseteq[-M,M]$, then $\text{diam}(S)\leq \text{diam}([-M,M])=2M<\infty$.
Edit in response to further question: As stated, the question only makes sense for $\mathbb R$, because it is not clear what one means by the absolute value of an element in an arbitrary metric space. However, there is a straightforward generalization if one considers a metric space induced by a norm. This consists of a vector space $S$ equipped with a norm function mapping $x\in S$ to a non-negative real number $\|x\|\geq 0$ such that $\|ax\|=|a|\|x\|$ for all real numbers $a$ and such that $\|x+y\|\leq \|x\|+\|y\|$ and $\|x\|=0$ implies $x=0$. Then the metric is defined to be $d(x,y)=\|x-y\|$. For any metric space induced by a norm in this manner, the same proof as above shows that the diameter of a set is finite if and only if the norm is bounded on that set.