(UK, mathematics) Making the most of a teaching job as an aspiring researcher
First, I’ll describe what happens at my department (engineering, high ranking, UK). It might be useful to understand the mindset.

We were recently hiring for teaching only position at my school (teaching fellow). The idea behind it was to get someone to teach in a specific area. The job is open-ended, the same salary as other faculty (Lecturer/assist prof), and has excellent career progression (to full professor on a teaching track). We wanted someone that loves to do that, teaching. If we wanted someone to do both, then we would open a position for someone to do both. 

As a panel, we tried to understand if the candidate really wanted to do research and was only using the position as a transition or as a way into the department. Then, we removed those candidates. Afterwards, there is a probation period of one year during which, if the person seems that is not interested in teaching (which was the job description), the school can decide to let them go.

The school only “allows” the teaching-only colleagues to research if it’s related to teaching. For instance, new teaching methods, methodologies, etc. With “allows”, I mean would shift timetable, include in workload, and pay for conferences. If the teaching staff wants to do anything not related to teaching, they need to do it at their own time and expense. PhD co-supervision is not possible.

To your questions

The more you stay in a teaching position, the more you’ll get trapped. Your peers in research or combined post will be encouraged and have more time to write grants and publish papers. Since these are the main characteristics looked for in research-track hiring and progression, you will gradually become unattractive for research-focused or combined positions.

Transitioning within the same department is indeed possible (but rare). We have a colleague that transitioned from a teaching to a combined position after three years. He is now transitioning back to a teaching post. He found that three years without publishing and without the skills that other research-track colleagues honed over the same three years (grant writing, networking, panels, etc.) it was impossible to attract funding (which is a requirement in our school to keep your position).

Edit based on OP comments

Our university offers two progression tracks. The research track has 80% research excellence, contribution to the field, and funding criteria and 20% teaching. The teaching track is the other way around.

The teaching-track research is on education in the area. One of the best journals for us as an example is IEEE Transactions on Education. Admittedly, most of the research is translational. That is, bringing modern educational concepts and ideas into the engineering teaching environment.

Other criteria involve participation to accreditation process, designing/updating teaching programs, achieving Fellow status at HEA, outreach activities at schools, etc.