I applied to the PhD program at the same school that I am currently working on my MS during my first year. My grad adviser was the one who actually told me that that was even a possibility. Otherwise, I would have waited to finish my MS, then apply for PhD programs. I'm not sure how your programs would feel about you applying to PhD programs at other schools, but if it's at the same school, I don't see why it's a problem. You would basically just continue on the path you are on and continue with the PhD program with funding.