Yes, and even top commanders, generals have to pass drug tests. Солдат российской армии проверят на наркотики
There is a system of periodic and snap tests for drugs.
Sailors on submarines are all contractors with very good salaries. For them even one positive test would mean dishonorable discharge. They would lose in this case many social benefits, including military pensions.
Maybe salaries and benefits in the RN are not so significant as some risk to lose them? Or maybe the 7 sailor would be allowed to serve further?
There are still conscripts in the Russian armed forces. And there are contractniks - contractors. As a rule they are the best conscripts who remain in the army to serve for salary.
As there are no conscripts in the HM armed forces then technically all servicemen(women) are contractors.