Yes the phrase modifies shall be driven entirely within a single lane. What the sentence means is that you should not cross from one lane to another unless it is safe to do so, or if there is some practical reason to do so - such as an obstruction which cannot be passed without moving into the next lane. Furthermore the sentence also stresses the need to remain in only one lane and not to drive between two lanes.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.