Again, treason is an offense citizens commit against their country. Civilians can be guilty of it just as people in the military can be.Not sure how the non-Starfleet civilians could be treasonous.
"Queens Anne Boleyn and Catherine Howard were executed for treason for adultery against Henry VIII" -Wikipedia "Treason". Leaving aside the question of whether they were actually guilty of adultery, they certainly were not members of the armed forces.
During the American Revolution, a slave in Virginia named Billy helped the British and was convicted of treason. He was not part of the American military. (He was later pardoned by then-governor of Virginia Thomas Jefferson, as having none of the benefits of Virginia citizenship he could not be expected to defend Virginia. (also Wikipedia under "Treason")