Generally such a charge is prosecuted under Article 92, UCMJ, as an orders violation. Each service has an order regarding relationships among the ranks.
What article of the UCMJ covers fraternization
Article 134
Article 134
Article 92
Article 86
Article 134 of the Uniform Code of Military Justice (UCMJ) covers fraternization. This article prohibits improper relationships between officers and enlisted personnel that are prejudicial to good order and discipline. Penalties for violating this article can include court-martial, reprimand, or other administrative actions.
Article 92
134
Article 134 of the Uniform Code of Military Justice (UCMJ) covers fraternization. It prohibits relationships between officers and enlisted members that violate prescribed regulations, as well as unprofessional relationships among individuals of different ranks that can affect good order and discipline within the military.
86
108
Article 91-Insubordinate conduct toward warrant officer, NCO, or PO