Sin is more than just one thing. Sin is a state (separation from God); sin is an act that creates that state. There isn't a simple definition, because the Bible gives us things that are wrong - i.e., the Law - and then says that we are spared from the law, which creates a nebulous definition - or a very simple one.
I prefer the simpler definition, because it's not nebulous at all. Sin is separation from God and anything that creates that separation. If I steal, then I do so against the Spirit - unless the Spirit guides me to do so. I'm not suggesting the Spirit would do so! However, as a trite (and well-known?) example, consider:
A man's wife is sick. He knows the medicine that can save her life; he knows a pharmacy that has this medicine, but he cannot afford it and the pharmacy will not give it to him. His choices are: let his wife die, or steal the medicine. What is right?
Well... I can't say.
First off, we all can recognize the situation is highly unrealistic; a pharmacy would probably say "here, have the medicine," or a hospital would give it to her. Plus, he'd have to be at the literal end of his credit tether, and I imagine something could be worked out. Deconstructing the question is painfully easy, and not the point.
I would say that *probably* the Spirit would say "save the life, steal the medicine," or at least I'd hope so if it was *my* wife. The edict is to save a life above all; that would be *my* guideline, I'd happily go to jail for the theft of the medicine if my wife's life was saved. That said, I don't know for sure, because it's a hypothetical; I'd pray about what to do, if the situation occurred, and try to obey the Will of God. If that Will was that my wife should die, well... that's tragic, and I'd have a very hard time with it. But the Will of God will be done in all things, in accordance with His plan.
However, the point remains: God *could* tell such a man that he is to steal the medicine. Would it be sin, in that case? I say no - because God told him to, and his stealing the medicine would be in God's Will and His heart. Yet it'd be a sin according to a strict set of rules.