Military officers are being allowed to investigate allegations of sexual assaults by soldiers behind closed doors without referring the cases to the police, the Guardian can reveal.

Commanding officers are able to deal internally with more than 50 categories of what the military views as "lesser" sexual offences, including sexual and indecent assaults, voyeurism and exposure.

The officer can then, without independent scrutiny, decide the case should be dealt with by a court martial, or to take no further action.

The family of Corporal Anne-Marie Ellement, who a coroner this week found had killed herself after being bullied in the army following an alleged rape by two Royal Military police officers who were never prosecuted, said they were "shocked and appalled" by the discretion afforded to officers.

Supported by Liberty, they are calling on the defence secretary, Philip Hammond, to change the law to ensure that all sexual assault allegations within the military are automatically referred to the police for investigation.

Ellement's sister Sharon Hardy said: "I would find it hard to believe that any commanding officer would have any form of training in relation to sexual assaults, bearing in mind unit welfare officers only have to attend a three-day course to hold a welfare position in the army and these are people potentially offering day-to-day support to victims of sexual crime."

Shami Chakrabarti, director of Liberty, has written to Hammond saying she was surprised to learn that within the 2006 Armed Forces Act commanding officers have the power not to refer sexual assault allegations to the police, and are able to investigate themselves or choose not to.

In her letter to Hammond, seen by the Guardian, Chakrabarti said the present legislation created "an obvious and unacceptable risk of injustice". She added: "In no other walk of life and in this day and age would this possibly be tolerated."

Liberty believes that the criminal offences of sexual assault, voyeurism and exposure appear to have been expressly excluded from the list of serious offences that must be referred by a commanding officer to the service police.

Hammond has not responded.

The coroner Nicholas Rheinberg this week ordered army chiefs to better protect soldiers who are raped or sexually assaulted following a damning inquest verdict on the death of Ellement. The 30-year-old Royal Military police officer hanged herself at the RMP barracks in Bulford, Wiltshire, in 2011, 23 months after an alleged rape by two military police colleagues. She had suffered a horrendous campaign of bullying as a result of her allegations.

The alleged rape was investigated by fellow officers within the Royal Military police and the two soldiers were never prosecuted. They remain in the army on full duties.

A new investigation into the alleged rape is being carried out by the RAF police with the support of two officers from Bedfordshire police. It is not known if specialist sex crime investigators are involved.

A spokesman for the Ministry of Defence said: "The welfare of our personnel is always our top priority and the Armed Forces Act was designed specifically to ensure that the service justice system is fully transparent and compliant with the European convention on human rights.

"Because we take this issue so seriously we are always looking at ways we can improve our handling of alleged sexual offences to ensure all allegations are dealt with robustly and that the individual involved receives all the support they need.

"This has included ensuring commanding officers seek legal advice when they investigate any allegation of sexual misconduct."