Not all inner product spaces even have an orthonormal basis, let alone one that consists of the eigenvectors of a self-adjoint linear operator. Your inner product space must be either separable or complete (those are sufficient, not necessary conditions) in order to even have any orthonormal basis. However, if you do have a complete inner product space (a Hilbert space), then I think the space would have an orthonormal basis consisting of the eigenvectors of T. Not seeing a reference for that off-hand, though...