Hello Benson,
"discedere non debeo" does mean "I ought not to leave" - it's almost like, "I don't have the right to leave". If you want to negate the obligation you would have to use something other than "debere" in your sentence, "oportet" for example. "mihi non oportet discedere" would be (I think!) "I don't have to leave."
Hope this helps,
Alvin