Devil's Due - S4-E13
Continuity mistake: As the camera does a close up on the shuttle craft's forward window as it approaches the Enterprise, the dorsal section is seen getting larger the closer they get. As Data and Picard talk, the image fades out, and a minute later, the angle changes, the dorsal section is again seen getting bigger, and the ship disappears.
Devil's Due - S4-E13
Continuity mistake: In Picard's quarters, Ardra appears as Troi. After reappearing as herself, she puts her hands on her hips. After the angle change, she repeats the motion.
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.