Question: are jedi allowed to leave the order?
Answer: Jedi can often leave the Order on their own free will. Often it is them becoming disappointed or distrustful in what the Order stands for. Ahsoka left the Order but remained good and kind-hearted. Dooku on the other hand, also voluntarily left the Order, but fell to the Dark Side.