Have Military Law Questions? Ask a Military Lawyer.
The message alone can rise to the level of fraternization and an unprofessional relationship.
While it would be difficult to do, it certainly could result in a separation effort by command for that officer. There would have to be a board hearing and, depending on how damaging the texts were, the board could choose retention or separation.
There doesn't have to be a sexual relationship for there to be a criminal offense, particularly when there is an officer and enlistment involved.