In the Name of God, the Most High
1. Masturbation is forbidden.
2. If a girl is mentally and physically mature in the sense that she knows what is in her best interest and what is in her disadvantage, her father’s permission is not required even though she might be a virgin. In fact, the recommended jurisprudential precaution and the obligatory moral precaution are to get her father’s consent and it is forbidden for a girl to hurt her father.
3. Given the supposition made in the question, temporary marriage concluded with all its conditions is preferred over self-gratification (masturbation) though the marriage might be without permission of the girl’s father.