Petty Officer Coates was promoted to Legalman First Class Petty Officer awhile back, but when she is in the elevator at the very beginning of the show, she is wearing her "Eisenhower" windbreaker jacket and the insignia on the collar indicates she is a second class petty officer. Oops.
When the police arrive to question Coates, Harm tells them he is her attorney. The detectives tell him he isn't and proceed to take both into custody and question them. The police have no legal authority to deny counsel to a suspect as they did here and any subsequent questioning would be thrown out at trial as a 5th amendment violation. While unlikely, the officers would also be subject to a federal prosecution for violating the civil rights of a person under color or authority of law.