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