LoglineCommander Una Chin-Riley faces court-martial along with possible imprisonment and dishonorable dismissal from Starfleet, and her defense is in the hands of a lawyer who’s also a childhood friend with whom she had a terrible falling out.
TNG's "The Drumhead" shows us that Federation law (or at least Starfleet Military Code of Justice) includes a similar right. Crewman Simon Tarses invokes the Seventh Guarantee when asked about his Romulan heritage.