I'm 17 years old male (not married). I'm just thinking about something that I do when I go for a bath, is it permissible to rub my penis during a bath with the intention of releasing semen and being lascivious? After that I wash my penis with clean water.
These Qur'an ayat are interpreted as forbidding masturbation:
And they who guard their private parts Except from their wives or those their right hands possess, for indeed, they will not be blamed - But whoever seeks beyond that, then those are the transgressors - ... -- Qur'an 23:5-7
I can tell you this is not permissible as it is the necessarily the same thing as masturbating.
This is confirmed by the verses:
"And those who guard their chastity (i.e. private parts, from illegal sexual acts). Except from their wives or (the captives and slaves) that their right hands possess, - for them, they are free from blame. But whoever seeks beyond that, then those are the transgressors." (23:5-7)
Instead you should fast if you feel any sexual desires as you aren't married, this was recommended by the Prophet SAW.