You can teach these lessons without engaging in an explicit discussion of "If you're going to steal, steal X and not Y". Just the intersection of "stealing is very bad unless absolutely necessary" and "some things are more important to people than other things" seems good enough to understand this.
I've never stolen anything, except for a few hearts, and was taught to never steal, and yet I can somehow piece together that it is better to steal something trivial to a person rather than the means of their survival if need be.