Sgt. Alicia White and Officer William Porter are two of the six officers charged in Gray's death.
Authorities say Gray, 25, suffered a spinal injury while being transported in a police van in April. He died one week later.
His death sparked outrage and demonstrations, some of which were plagued by arson, vandalism and looting, despite his family's pleas for peace.
The six officers, who authorities say played various roles in Gray's arrest and transportation to a police booking facility, face separate trials on charges ranging from assault to murder. The first -- Porter's -- is due to start in late November.
All six have pleaded not guilty.
Also on Tuesday, Judge Barry Williams announced a gag order, preventing attorneys on both sides from discussing the case with anyone outside of their legal teams.
White argued she felt compelled to give statement
Gray was arrested on a weapons charge April 12 and suffered a severe spinal cord injury while being taken away in a police van, authorities said. That injury led to his death seven days later.
State's Attorney Marilyn Mosby has said Gray's injury happened because he was handcuffed and shackled -- but not buckled in -- inside the police van.
Five of the six officers charged in Gray's death gave statements to the department. The only one who did not was Caesar Goodson, who police say drove the van.
Detectives interviewed White twice, on April 12 and April 17. In court Tuesday, White's attorneys argued that she felt compelled to answer detectives' questions because of her department's standing order requiring officers to provide statements in investigations.
Prosecutors argued that White was interviewed only as a witness in the case on April 12, and when she was re-interviewed five days later because of alleged inconsistencies in accounts, she signed a statement waiving her Miranda rights to silence.
Porter's attorneys argued that under the Maryland Law Enforcement Officers Bill of Rights, his statements should not be admitted. Judge Williams ruled otherwise.