Masturbation is a grey area.  Though the bible is very specific about sin, it does not include Masturbation in that category.  God who gives very clear instructions on what is clean and unclean is strangely silent on this topic.

Lust however is not a grey area.   Some people are able to separate masturbation from lustful thoughts.  Others are not.

There are differing views on this delicate and profoundly personal issue.  Keep in mind that conviction comes from God and condemnation comes from the enemy.   It is not wisdom to make more rules than God.