Continuity mistake: At the end, Picard is looking out the window when Worf comes in. There is a plant next to Picard in the close up, but it's missing in the long shots.
Other mistake: The ship warp core was damaged by an explosion earlier and was offline in the first 32 minutes of the episode. But the ship's CGI indicates that it was online all through the episode.
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.