What is the definition in general?
This question has arised mainly due to the fact that the word "sphere" is used for 3-dimensional space. What if I want to define for any space? For a real line or for n-dimensional space?
I am afraid whether I am using wrong textbook. The definition goes like:
Let $(X,d)$ be a metric space. Let $x$ be in $X$ and $r$ be any non negative real number. The open sphere with centre $x$ and radius $r$ is the subset of $X$ given by the set of all $y$ in $X$ such that $d(x,y)<r$.
According to your definition, the term sphere is defined on a metric space. Indeed, if you read the definition, it only involves a set $X$ and a metric $d$ that is defined on the set $X$.
So you are right. What you call "3-dimensional space", which is $\mathbb{R}^3$ is a metric space. Usually we equip it with the Euclidean norm. More than that, it makes perfect sense talking about sphere in even higher dimensional space such as $\mathbb{R}^n$.
Just to add one more interesting thing. We can not only change the set $X$ but we can also change the metric $d$. It doesn't have to be Euclidean metric. It can be, for example, Taxicab metric or the metric derived from the supremum norm.