A distinction in a UK Masters degree will depend on how well you have performed in exams. In many cases greater weight will be given to the performance in your dissertation. Whether or not a distinction is imperative for admission to a PhD will depend on the subject area and the competition for places at that time.