Yesterday's Enterprise - S3-E15
Revealing mistake: When Tasha and Castillo walk up to the bar in Ten Forward, Whoopi Goldberg can be seen standing outside the door waiting for her cue to walk in the room.
Revealing mistake: In an overhead shot of the Brattain, it's clear that the ship's (misspelled) name is just a poorly applied decal.
Revealing mistake: In the sickbay, the wall where the biobeds are located can be easily seen as a wall used for what would be in the Conference lounge. The alcoves have a fabric covering the windows, and it appeared to be a hastily done redress.
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: As Data cautions La Forge not to say anything, his actual flesh tone is visible on his palm.
Revealing mistake: As Data looks at the information on Dixon Hill, as the computer flash feeds, you can see that it's all the same block of information starting with the title of the first novel, which is the title of the episode, "The Big Goodbye."
Revealing mistake: In the cargo bay, as Riker stands alone, through the whole scene where a case is about to hit him, you can tell it's a stuntman with a bad wig.
Descent (1) - S6-E26
Revealing mistake: In the hand-to-hand with the Borg soldier, Data's stunt double is easily identifiable.
Revealing mistake: Just after Riker and Geordi are talking in the turbo lift, it cuts to a view from outside the ship and shows the USS Hood flying next to the USS Enterprise. As the ships draw nearer, the views of both ships overlap, and a black mat outline can be seen around the saucer section of the Hood as it passes by the Enterprise's starboard nacelle.
Revealing mistake: When the first villain hits Worf with the chair, just as Alexander is yelling "look out", you can tell it is a stunt double.
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)
The Arsenal of Freedom - S1-E21
Revealing mistake: As Data ducks to avoid the blast from the probe, the scene shifts to a wide shot. After Data tosses Yar to safety, he jumps after her. As he does, you can tell it's a stunt man with a bad wig.
Revealing mistake: When Data gives Spot his food, when he puts the food on the ground you can see his normal skin (human skin). (00:16:35)
Revealing mistake: When looking at Kolrami, the line between his make up and actual skin tone can be seen between his scalp, hairline, and the back of his neck.
Revealing mistake: When Picard takes his seat in the Captain's chair after informing Dathon's crew he has been killed, the reflection of an overhead rig of gelled lights can be seen in the blade of Dathon's knife, which Picard is holding, as Picard says the line, "but at least they're not new enemies."
Revealing mistake: At the end of the episode, when Mrs. Troi enters Ten Forward naked, the flesh-colored top Majel Barrett is wearing is visible.
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.