Barring complications, you can work up until the day you deliver. How comfortable you'll be is another issue altogether. If you have a job where you're on your feet a lot or have to do physical work or a lot of bending/stretching, you might find that you're more willing to take off a few weeks before the birth. Or it might not bother you at all!
My last pregnancy I had complications with my hip, and because I had a full-time job that was spend 90% of the time on my feet, I took off halfway through my 7th month. My job now thankfully is much kinder on me physically, so I'm hoping to work until at least the beginning of December.