The preposition "in" can stand with either Dative or Accusative, resulting in different meanings. The same is true for all of the following prepositions:
an, auf, hinter, in, neben, über, unter, vor, zwischen
With Accusative, they describe the destination or direction of the verb ('Ich laufe in den Wald' means I'm running into the forest, but I'm not there yet).
With Dativ, they describe the location of the verb ('Ich laufe im Wald' means I'm running while I'm in the forest.)
'Schau in die Schublade' (Accusative) thus means to direct your gaze into the drawer (as your gaze is currently directed elsewhere, hence from outside).
'Schau in der Schublade' (Dative) is indeed, as mentioned in another answer, an abbreviated version of 'Schau in der Schublade nach', which means to look around in the drawer (as your gaze is already directed into the drawer, hence from inside).
Strictly speaking, 'schauen' must then stand with Accusative, while 'nachschauen' must stand with Dative.
The different meanings explain the gut feeling you described: "Schau in der Schublade (nach)" (Dative) means "search for it in the drawer", implying that you think the socks might be in there but aren't sure. "Schau in die Schublade" (Accusative) means "look in the drawer", implying that there is no need to search because you already know the socks are in there.