In theory you can veg indefinitely, but in practice in you're growing indoors you'll eventually hit a limiting point where the roots outgrow the container, or the plant outgrows its light supply.
But so long as you have the appropriate container size and enough light, you definitely can veg a plant for months. . .in fact, that's normally what happens in nature, and its how you get really big outdoor plants.