Yes you can marry when ever you need to marry to save yourself from falling in sinful acts. In fact, it is the responsibility of the father to arrange the marriage of his son when he needs marriage. Parents are not allowed to object or delay the marriage if it is for save guarding the son or the daughter from sinful acts.
Man does not need permission from his parents in marriage, but virgin daughter needs permission of her father or paternal grand father in her marriage. Yet, if the father refuses the marriage of his daughter for no valid reason, when she needs marriage to protect herself from sinful acts, she will be then allowed to marry with the suitable believer.