Context: The previous sentence talks about how the little finger is just one part of the body, rather than an independent individual.
My translation of this is:
Instead of being conscious of him being just a little finger(a part of something bigger), the little finger thinks of himself as a single body, along with the owner (my hazy understanding of that と). But when the owner sleeps, he thinks of himself suddenly as an independent little finger(小指としてだけ）.
Does that seem right?