Revealing mistake: When the force field is activated in the Jeffries Tube, we only see the flash of light from off-screen. The effects team neglected to add the force field effect.
Data's Day - S4-E11
Revealing mistake: When Data asks the replicator for Feline supplement 74 and gives then gives it to Spot, a bug is crawling on the food. Replicators cannot create living organisms. (00:13:15)
Data's Day - S4-E11
Revealing mistake: When Data and Dr. Crusher are tap dancing on the holodeck, whenever the camera angle changes to a wide shot from above (for the more complex dance moves), it's clear it is not Brent Spiner but a stand-in dancing.
Revealing mistake: In an overhead shot of the Brattain, it's clear that the ship's (misspelled) name is just a poorly applied decal.
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.