You have heard of a wrong identification.
In his book Théorie des distributions, Laurent Schwartz mentions that by identifying $S^n$ with the one point compactification of $\mathbb R^n$, the space $\mathcal S(\mathbb R^n)$ may be identified with the space $\dot{\mathscr D}(S^n)$ of all scalar smooth functions on $S^n$ whose derivatives of any order all vanish at infinity (in the latest edition (Zbl 0962.46025), see chap. VII, § 3, th. II).
Identifying $x$ with the point at infinity, the space $\dot{\mathscr D}(S^n)$ is a lot smaller than $C^\infty_x(S^n)$ as there are many extensions of rational functions with no singularity in $\mathbb R^n$ that are in $C^\infty_x(S^n)$ but not in $\dot{\mathscr D}(S^n)$.
The identification between $\dot{\mathscr D}(S^n)$ and $\mathcal S(\mathbb R^n)$ is quite intuitive.
If $f\in\mathcal S(\mathbb R^n)$, then by composing with the inversion $y\mapsto\|y\|^{-2}y$, you obtain a smooth function $g:S^n\setminus\{0\}\to\mathbb C$ whose derivatives all decay at $0$ faster than any $\|\cdot\|^k$. So $g$ may be extended at $0$ into a smooth function whose derivatives all vanish at $0$ and by composing again with the inversion $y\mapsto\|y\|^{-2}y$, you can see that the continuous extension of $f$ to $S^n$ is smooth and all its derivatives vanish at infinity.
Conversely, if $f\in\dot{\mathscr D}(S^n)$, then by composing with the inversion $y\mapsto\|y\|^{-2}y$, you obtain a smooth function $g:S^n\to\mathbb C$ whose derivatives all vanish at $0$. The Taylor expansion of $g$ then tells you that the derivatives of $g$ all decay at $0$ faster than any $\|\cdot\|^k$ and by composing with the inversion $y\mapsto\|y\|^{-2}y$ again, you can see that the derivatives of $f$ all decay at infinity faster than any $\|\cdot\|^{-k}$.