Update:
̶F̶o̶r̶ ̶o̶d̶d̶ ̶$n$,̶ ̶i̶f̶ ̶ $x^2 = a \pmod{n}$ ̶h̶a̶s̶ ̶a̶ ̶s̶o̶l̶u̶t̶i̶o̶n̶ ̶t̶h̶e̶n̶ ̶a̶t̶ ̶l̶e̶a̶s̶t̶ ̶o̶n̶e̶ ̶s̶o̶l̶u̶t̶i̶o̶n̶ ̶h̶a̶s̶ ̶a̶ ̶s̶p̶e̶c̶i̶f̶i̶c̶ ̶r̶e̶p̶r̶e̶s̶e̶n̶t̶a̶t̶i̶o̶n̶.̶
See the counterexample provided by lonza leggiera.
Also, see my conjecture (stated on November 10, 2020 and still open on November 14),
$\quad$ A new method for finding a solution to $x^2 = a \pmod p$?
arising from this initial work.
Here is the proposed representation,
For odd $n$, if $x^2 = a \pmod{n}$ has a solution then there is at least one solution $b$ such that there exists a $k \ge 0$ such that
$\tag 1 \text{The residue, } \Large 0 \lt r \lt n, \normalsize \text{ of } \, \Large 4^k a \, \normalsize \text{ is a square}, \Large r = t^2$
$\tag 2 \LARGE b \equiv 2^{-k} t \pmod{n}$
Is the above proposed representation valid?
My work
What got me going on this can be found in my answer to
$\quad$ How to solve $x^2 \equiv 12 \pmod {13}$?
I then looked at this
$\quad$ How to solve $x^2\equiv 4\pmod{143}$?
and found that the representation works for all solutions.
Example 1:
We have $141^2 = 4 \pmod{143}$. Also,
$\quad 4^{38} \cdot 4 \equiv 25 \pmod{143}$
and
$\quad 141 \equiv 2^{-38} \cdot 5 \pmod{143}$
Example 2:
There are two solutions, $3$ and $4$ for $x^2 \equiv 2 \pmod{7}$; the representation works for $4$ but not for $3$.
Example 3:
The representation, if sound, could be used to show that $x^2 \equiv 3 \pmod{7}$ has no solutions.
Our 'lookup table of squares', $S$, is defined by
$\quad S = \{1,4\}$
$\; 4^0 \cdot 3 \equiv 3 \pmod{7} \text{ and } 3 \notin S$
$\; 4^1 \cdot 3 \equiv 5 \pmod{7} \text{ and } 5 \notin S$
$\; 4^2 \cdot 3 \equiv 6 \pmod{7} \text{ and } 6 \notin S$
$\; 4^3 \cdot 3 \equiv 3 \pmod{7} \text{ and } 3 \notin S \text{ and the cycle repeats} $
and we could argue that $x^2 \equiv 3 \pmod{7}$ has no solutions.
Example 4:
Find (if it exists) a solution to $x^2 \equiv 7 \pmod{9}$.
Our 'lookup table of squares', $S$, is defined by
$\quad S = \{1,4\}$
$\; 4^0 \cdot 7 \equiv 7 \pmod{9} \text{ and } 7 \notin S$
$\; 4^1 \cdot 7 \equiv 1 \pmod{9} \text{ and } 1 \in S$
There is a solution, $\large x \equiv 2^{-1} \times 1 \equiv 5 \pmod{9}$.
Example 5 (motivated by this question on quadratic reciprocity):
Find (if it exists) a solution to $x^2 \equiv 3\pmod {10007}$.
Our 'lookup table of squares', $S$, is defined by
1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3600, 3721, 3844, 3969, 4096, 4225, 4356, 4489, 4624, 4761, 4900, 5041, 5184, 5329, 5476, 5625, 5776, 5929, 6084, 6241, 6400, 6561, 6724, 6889, 7056, 7225, 7396, 7569, 7744, 7921, 8100, 8281, 8464, 8649, 8836, 9025, 9216, 9409, 9604, 9801, 10000
Calculating,
$\; 4^0 \cdot 3 \equiv 3 \pmod{10007} \text{ and } 3 \notin S$
$\; 4^1 \cdot 3 \equiv 12 \pmod{10007} \text{ and } 12 \notin S$
$\; 4^2 \cdot 3 \equiv 48 \pmod{10007} \text{ and } 48 \notin S$
$\; 4^3 \cdot 3 \equiv 192 \pmod{10007} \text{ and } 192 \notin S$
$\; 4^4 \cdot 3 \equiv 768 \pmod{10007} \text{ and } 768 \notin S$
$\; 4^5 \cdot 3 \equiv 3072 \pmod{10007} \text{ and } 3072 \notin S$
$\; 4^6 \cdot 3 \equiv 2281 \pmod{10007} \text{ and } 2281 \notin S$
$\; 4^7 \cdot 3 \equiv 9124 \pmod{10007} \text{ and } 9124 \notin S$
$\; 4^8 \cdot 3 \equiv 6475 \pmod{10007} \text{ and } 6475 \notin S$
$\dots\quad$(and writing several lines of python code)
$\; 4^{482} \cdot 3 \equiv 4664 \pmod{10007} \text{ and } 4664 \notin S$
$\; 4^{483} \cdot 3 \equiv 8649 \pmod{10007} \text{ and } 8649 \in S$
and $8649 = 93 \times 93$.
There is a solution, $\large x \equiv 2^{-483} \times 93 \equiv 1477 \pmod{10007}$.
The representation is not always possible. If $\ n=63\ $ and $\ a=58\ $, then the equation $\ x^2=a\pmod{n}\ $ has the solutions $\ x=11\ $ and $\ x=52\ $. If $\ r\ $ is a residue of $\ 4^ka\pmod{n}\ $, then its only possible values are $\ 58\,(k\equiv0\pmod{3})\ $, $\ 43\, (k\equiv1\pmod{3})\ $, and $\ 46\,(k\equiv2\pmod{3})\ $, none of which is a square.