Yes Onako, it is true, but for a different reason, than stated by HallsofIvy.
If the columns of [itex]X[/itex] are linearly independent, [itex]X^*X[/itex] is an invertible [itex]p\times p[/itex] matrix (here [itex]X^*[/itex] is the Hermitian conjugate of [itex]X[/itex], i.e. the conjugate transpose of [itex]X[/itex] ; if [itex]X[/itex] is real then [itex]X^*=X^T[/itex] (I use [itex]X^*[/itex] only because what I say works for complex matrices as well).
Matrix [itex]X^*X[/itex] is positive semidefinite for all [itex]X[/itex] , and since [itex]X^*X[/itex] is invertible, [itex]X^*X[/itex] is positive definite (all eigenvalues are positive). Since the matrix [itex]X^*X[/itex] is Hermitian (symmetric if [itex]X[/itex] is real), it is can be diagonalized, i.e. it can be represented as a diagonal matrix in some orthonormal basis, or equivalently, it can be written as [itex]X^*X =U^* D U[/itex], where [itex]U[/itex] is a unitary matrix ([itex]U^{-1}=U^*[/itex]) and [itex]D[/itex] is a diagonal matrix with eigenvalues of [itex]X^*X[/itex] on the diagonal.
We can take a square root of [itex]X^*X[/itex], namely [itex]B = U^* D^{1/2} U[/itex], where [itex]D^{1/2}[/itex] is obtained by taking square roots of diagonal entries of [itex]D[/itex] (recall that [itex]D[/itex] is a diagonal matrix). Then [itex]B^*=B[/itex], and [itex]X^*X = B^2[/itex], and [itex]A=B^{-1}[/itex] is the matrix you want.
Indeed, if [itex]Y=XA[/itex], then [itex]Y^*Y = A^* X^*X A = A^* B^2 A =A B^2 A =I[/itex].