Techniques from algebraic geometry may be used for this problem. Everything in this answer is available in Hartshorne chapter II section 6 and probably also the section of Vakil dealing with divisors.
Theorem. Suppose $A$ is a noetherian domain. Then $A$ is a UFD iff $X=\operatorname{Spec} A$ is normal and $\operatorname{Cl} X=0$.
It's clear that with $A=\Bbb C[x,y,z]/(x^2+y^2+z^2-1)$, $X$ is normal (it's even smooth), so we can compute $\operatorname{Cl} X$ to see whether $A$ is a UFD or not.
Let $X'=V(-x_0^2+x_1^2+x_2^2+x_3^2)\subset\Bbb P^3$. Then $A$ is the coordinate algebra of $D(x_0)\cap X'$, and the class groups of $X$ and $X'$ are related by the exact sequence $$\Bbb Z\to \operatorname{Cl} X'\to\operatorname{Cl} X\to 0,$$ where the first map sends $1$ to the class of $V(x_0)\cap X$. As the middle group is $\Bbb Z^2$ from identifying $X'$ with $\Bbb P^1\times\Bbb P^1$, $\operatorname{Cl} X\neq 0$ and thus $A$ is not a UFD. (NB: if you're reading this and wondering how this all breaks for the real case mentioned at wikipedia, the class group of $X'$ depends on the base field!)
One can probably also use a norm map to prove that the elements in your factorization are indeed irreducible. See here for an example.