Continuity mistake: Near the end, when Pulaski finally stops the infection in Riker and is just about to contact Picard with her success, look at Riker lying on the table. His eyes are open, then he closes them slowly. The next scene has Riker opening his eyes for the first time after recovering from the procedure.
Other mistake: In this episode, in Riker's memory, the encounter between him and Quinn is re-lived. As Quinn starts to attack Riker, you can see Riker's stunt double's face, and tell that it's Quinn's stunt double, as the hair is smooth, not styled. Also, Riker is a few inches taller than Quinn, but in the onset of the attack, they're equal heights.
Continuity mistake: After Pulaski examines Riker's leg, and readies to beam up, he leans to the right to get up. In the wide shot, he does it again.
Answer: Yes. The doors to the holodecks can be locked when in use by anyone aboard the Enterprise so they couldn't be disturbed. However, high ranking officers like Captain Picard could override the doors as it's seen that overrides are in use even for the crews quarters. Even Barclay, when he's indulging in one of his fantasies could have the doors to the holodeck unlocked by an override code.