@reika actually... In this particular scenario, it's possible for her been marry.
She is not a real nun, not yet. For that, some years of training are needed. In this moment at the most it is a novice and to this part they can resign.
In addition, she is a noble who is "locked up" there as punishment (it is the prison for noble women in medieval times), which means that until she does not "purge" all her "sins" (which is decided by the superior mother of the convent), it will not be possible for her to take the vows.
Whatever; since she is a disgraced noblewoman, her family is supporting the convent to keep her under surveillance, if she takes the vows, by tradition, she would have to renounce the rights of her family, and the convent can not afford that, so it's not like they're going to allow her to become a "real nun"
As for marriage ... that would be the only way to leave the convent, but since her was "discarded" once, she's considered a damaged property, in addition to the prince who hates her guts. So, although technically it is possible for her, the problem would be to find someone who accepts it despite being "second hand".
The crime for which she was actually convicted is not to have bothered the princess (although it is part of the problem), but to have been repudiated by her fiancé.
Of course, all this would be assuming that they followed the logical historical rules that otomes almost never follow. Although in this his "victim" was a position higher than her, which gives some realism.