A service supporting young people in some of Edinburgh's most deprived communities to stop using drugs and alcohol is facing imminent closure.