The reason why \CJKnumber{\ref{X}} cannot work is as follows. While \CJKnumber expects its argument to be a number, the \ref macro isn't expandable; therefore, \CJKnumber is not receiving a number to work on. (Jargon-Alert: "expandability" and "expansion" of macros is at the very core of the TeX programming language.)
What's the remedy? I suggest you employ the refcount package and its \getrefnumber macro; in contrast to \ref{<some_label>}, \getrefnumber{<some_label>} is expandable. The upshot is that \CJKnumber{\getrefnumber{<some_label>}} works as expected.

% !TEX TS-program = xelatex
\documentclass{article} % or some other suitable document class
\usepackage{xeCJK,CJKnumb}
\setCJKmainfont{SimSun}
\usepackage{refcount} % for \getrefnumber macro
\begin{document}
\addtocounter{equation}{554} % just for this example
\refstepcounter{equation}\label{eq:something}
\ref{eq:something}
\CJKnumber{\getrefnumber{eq:something}}
\end{document}
\ref{X}is defined? (And\labelis written to theauxfile, but this hasn't changed for a long time, so changing to MikTeX 2.9 wouldn't have broken it.) – Teepeemm Dec 09 '23 at 03:32refcount. Possible duplicate: How to use\pageref{foo}as a number? – Werner Dec 09 '23 at 04:12