The dress that Ms. Youssef wore at the film festival — a semitransparent outfit that exposed most of her legs — led some Egyptians to support her prosecution.

“She, and whoever let her appear like this, must be put on trial,” one person said on Twitter.

Others said the case revealed the mind-set of the men who had brought the charges, using a law that allows one Egyptian to file a lawsuit against another for vague crimes like immorality and “insulting” the nation.

The dress has only exposed your obsession,” the director Amr Salama said on Twitter.

Ms. Youssef apologized for wearing the dress and stressed that she respected Egyptian cultural and moral values. “I didn’t expect this reaction, and if I had known, I wouldn’t have worn this dress,” she said in a statement.

One of the prosecuting lawyers, Samir Sabry, claims to have filed more than 2,700 such lawsuits over 40 years, targeting actors, clerics, politicians and belly dancers. He even sued the makers of a famous puppet show, “Abla Fahita,” for a skit on the novel “Fifty Shades of Grey.” The case failed.

Mr. Sabry, who supports Mr. Sisi, has also brought lawsuits against the president’s political opponents, including members of the Muslim Brotherhood.

In 2013, many Egyptians supported the military takeover that brought Mr. Sisi to power out of fear that the Muslim Brotherhood, whose leader, Mohammed Morsi, was ousted from power, would restrict women’s rights and social freedoms. On Sunday, some noted acerbically on Twitter that those same rights had been eroded under Mr. Sisi.

The vigilante-driven court activism of the Sisi era has also led to harsh restrictions on some minorities, last year prompting the harshest crackdown on the gay community in decades. The case against Ms. Youssef also highlights the highly variable speeds of Egyptian justice.