Nasrin gets engaged and still wants to love Sahar on the side, but Sahar won't do that. She is desperate to be the one to marry Nasrin, so much so that she wants to have gender reassignment surgery.
In Iran, the government pays for at least half of the operation. And since the Koran doesn't mention that an operation like this is a sin, it isn't a sin. The transgendered person is seen as mentally ill and the surgery is the cure.