Continuity mistake: When Geordi is put onto a bed in sickbay there are two pillows - when he gets up to leave a little later they have disappeared.
Continuity mistake: At the very beginning of the Episode, Picard makes a log entry stating that the Enterprise is heading for the USS Tsiolkovsky at warp seven. Subsequent outside shots of the ship show it is traveling at impulse.
Continuity mistake: When Data brings up a picture of the original Kirk-era Enterprise in conjunction with the log talking about the water-intoxicant, the picture is of the refitted movie-style Enterprise - not the original round-nacelled model that was involved in the events of "The Naked Time."
Continuity mistake: While Troi and Yar are talking while holding hands in Troi's quarters, there is a piece of cloth between their hands in one camera angle, but in another camera angle, there is nothing between their hands.
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.