Let me see if I got this right, what you are asking is, if for instance, a friend invites you over to their house, and you take something of theirs, while you are there, without their permission, is it still theft?
Or maybe they give you a key and say you are welcome anytime, and you help yourself to something while you are there, again without their permission.
Yes, this would still be considered theft. I mean, when you are in a store as a customer, and take something without paying for it, you had permission to be on the premises, but it is still theft.