Women in ancient Egypt had a great many rights. They were not equal with men but they quite a lot of say over their lives.
Women who broke the law faced the same penalties as men, and were expected to defend themselves in court just like men.
Women did not have to marry in ancient Egypt. They could refuse an offer of marriage. But most women who married were about 12-14 years old. Women brought a dowry with them into the marriage. (A dowry is some type of wealth in land or cattle or goods.)
Before a marriage took place, an agreement was signed that said anything a woman brought into a marriage (her dowry) was hers to keep forever. That included land, as women could and did inherit land from her parents. This was an important agreement because women could divorce their husbands.
After a woman married, her first duty was to be a good wife and mother. Along with caring for her children, a woman could get a job if she wanted outside of the home. Women could own a business. They could run a business. They could buy and sell property. They could write a will, or have one written for them, leaving all their personal goods to anyone, including their daughters. Married women could even get a divorce.
If a woman was unhappy in her marriage, she could ask the court for a divorce. She had to give the court a good reason. If the court granted her request, she received custody of the kids, her original dowry, her personal possessions including any gifts her husband had given her during their marriage, and any property that had been willed to her during her marriage. Plus, she received about one third (1/3) of her husband's wealth, so she could take good care of the children. After a divorce, a woman might decide to stay single, or she might remarry. If she remarried, everything given to her by the court remained hers.
Men could ask the court for a divorce, but if granted, the woman still received everything she would have gained had she asked for the divorce.