How can a person be abstinent and overcome all sexual urges including self-gratification in accordance with the Buddhist tradition ? What prescription do the teachers give to get over such obstacles ?
Any such urge gives rise to feelings. What you should do is look at the feeling equanimously and objectively so that cravings for sensual pleasures do not arise. This is in Dependent Origination.
Initially the success would be very limited with only a few seconds of success, but as you go on the duration would increase and at one point you would be able to continuously be equanimous. To be able to do this you have to do Vipassana Meditation.
For a lay person the general recommendation is to abstain from sexual misconduct. You do not have to go to this extent, but this would become natural when you become Anāgāmi which is one Stage of Enlightenment.
Patikulamanasikara is a special meditation recommended for lustful personalities. Back in the day, in India, they used to wrap dead bodies in robes(Pansukula) and throw to a designated land without burying or burning. These places are ideal to do this kind of meditation as you can observe the rotting bodies. Nowadays, it's pretty difficult to get access to a corpse, unless you work in the morgue. Although you could google for pictures and videos of decomposing bodies. Better to start it under the guidance of a teacher. At some point, you will have to turn the meditation in to Vipassana, if you are looking for a lasting solution.
Check out the Third Mindfulness training listed here: The Five Mindfulness Trainings (Page 8). These are the precepts written by Thich Nhat Hanh. I am not going to summarize his commentary, but hopefully his writing can help shed light on what you are looking at. May you be happy.