Assume that a real-valued symmetric matrix $M$ with trace zero can be written as $$ M = A + A^T, $$ with $A^2=0$.
Given that $M$ is known, how (if possible) can $A$ be found?
The diagonal elements of $A$ are just half those of $M$, that is $$ A_{ii}=M_{ii}/2. $$
But for the non diagonal ones, considering only the decomposition above, the number of unknowns is the double of the number of equations: $$ M_{ij}=A_{ij}+A_{ji}, $$ with $i\neq j$, implying that is not possible to get an unique solution.
Using the nilpotency property of $A$, nonlinear equations such as $M^2=AA^T+A^TA$ or $A^TMA=0$ can be generated, but I can't see how using these nonlinear relations can lead to an unique solution.
Let $M=2S$. If $M=A+A^T$, we must have $A=S+K$ for some skew-symmetric $K$. The equation $A^2=0$ is then equivalent to $S^2+SK+KS+K^2=0$, and further equivalent to the system of equations \begin{cases} S^2+K^2=0,\\ SK+KS=0 \end{cases} because $S^2+K^2$ is symmetric but $SK+KS$ is skew-symmetric.
By orthogonal diagonalisation, we may assume that $$ S=U\left[\pmatrix{c_1I_{p_1}\\ &-c_1I_{q_1}}\oplus\cdots\oplus \pmatrix{c_kI_{p_k}\\ &-c_kI_{q_k}}\oplus0_{r\times r}\right]U^T,\tag{1} $$ where $U$ is real orthogonal, $c_1>\cdots>c_k>0$. It follows from $SK+KS=0$ that $$ K=U\left[\pmatrix{0&-Y_1^T\\ Y_1&0}\oplus\cdots\oplus \pmatrix{0&-Y_k^T\\ Y_k&0}\oplus Z\right]U^T,\tag{2} $$ where the size of each $Y_i$ is $p_i\times q_i$ and $Z$ is an $r\times r$ skew-symmetric matrix. But then the equation $S^2+K^2=0$ implies that $Y_i^TY_i=c_i^2I_{p_i},\ Y_iY_i^T=c_i^2I_{q_i}$ and $Z^2=0$.
Since $Y_i^TY_i$ and $Y_iY_i^T$ have the same ranks, in order that a solution exists, we must have $p_i=q_i$ for each $i$, i.e. a solution exists only if the set of all nonzero eigenvalues (if any) of $S$ can be divided into pairs of the form $(c,-c)$. This condition is also sufficient: when it is satisfied, i.e. when $p_i=q_i$ in $(1)$ for every $i$, the general solution $K$ is given by $(2)$, with $Z=0_{r\times r}$ and each $Y_i$ equal to $c_iQ_i$ for some real orthogonal matrix $Q_i$ of size $p_i$.
Numerical example. Suppose we are given the following real symmetric matrix $M$ with zero trace:
Let $S=M/2$. We may perform an orthogonal diagonalisation on $S$ and sort the eigenvalues in decreasing magnitudes:
The eigenvalues of $S$ are given by
They cannot be grouped into pairs of the form $(c,-c)$, probably due to rounding errors. So, let us treat the last five eigenvalues of $S$ (which are $<10^{-7}$ in magnitudes) as zeroes. That is, we suppose $S$ is actually $$ S=U\left[\pmatrix{\frac12\\ &-\frac12}\oplus0_{5\times5}\right]U^T. $$ Compared with $(1)$, we have $k=1,\ c_1=\frac12,\ p_1=q_1=1$ and $r=5$. Thus by $(2)$, $$ K=U\left[\pmatrix{0&-c_1Q_1^T\\ c_1Q_1&0}\oplus0_{5\times5}\right]U^T, $$ where $Q_1$ is a real orthogonal matrix of size $p_1=1$, meaning that $Q_1=\pm1$. In other words, $$ K=\pm U\left[\pmatrix{0&-\frac12\\ \frac12&0}\oplus0_{5\times5}\right]U^T $$ and we may take $A=S+K$ or $S-K$:
E.g. the solution $A=S+K$ is found to be
and you may verify that both conditions $M=A+A^T$ and $A^2=0$ are satisfied: