"Lecturer" is a title with very different meanings in different countries.
In the US system, the title typically indicates either a part time instructor or a person who is a full time teacher but not a tenured or tenure track faculty member. In the UK and many other commonwealth countries a "lecturer" is the equivalent of an assistant or associate professor in the US.
My answer below is in the context of the US system.
Within the US system, if you want to be a "professor" of mathematics at a prestigious university then you have to be an active researcher. It is sometimes possible to earn a PhD and do some research and then move onto a career as a tenured faculty member at a less prestigious college or university while doing very little research after the PhD. However, the competition for such positions is extremely intense (hundreds of applications for a tenure track position are common) and many colleges that wouldn't have cared about research in the past can now expect to hire faculty who will be active in research. Many universities at all levels have non tenure-track positions for instructors, but these jobs typically are part time or pay very poorly and offer little job security. Finally, there are full time and permanent teaching positions at community colleges where some of the instructors may have PhD's, but its also common for instructors to have only a master's degree.
The typical career path is for students to complete a strongly research oriented PhD program and then (after one or more post docs or visiting assistant professor positions) to attempt to find a tenure track position at a reputable university. Most of these students end up either leaving the field entirely or end up in teaching oriented position at a lower ranked college or a community college. A relatively small number of PhD's end up with tenured faculty positions at research universities. However, the system still very much requires students to complete a research oriented PhD before "settling" for a teaching position.
If you're not seriously committed to research and you really do just want to teach mathematics, then I would discourage you from entering a PhD program. Rather, you might consider an MS program that has a good track record of getting its graduates into community college teaching.
I should also mention that there are PhD programs in "Mathematics Education", but the focus in such programs is typically on education more than mathematics. Graduates with PhD's in math ed are highly employable in the US right now. Typically, they are hired to supervise developmental, remedial and lower level courses (up to say the level of calculus) while regular tenure track faculty teach higher level courses.