I think you are pretty close with #2, but in this situation I would not use sed, because that is more of a conjunction between two separate ideas, rather than a way of coordinating a parallel idea. It would be better to use at. So, the easy out is to just avoid the negative imperative altogether:
Da mihi librum at ne ensem.
If, for some reason, the negative imperative is required, then probably the best option would be to use ne with the subjunctive, just be aware that it would sound very colloquial, even vulgar, to a Roman:
Ne des ensem sed librum.
In this kind of expression sed is called for because you need something strong. You could potentially use quamquam or maybe even quin here instead of sed, but sed would seem to be the simplest approach.
Note that in many cases the perfect (rather than the present) subjunctive is used for negative imperatives and this is in fact somewhat more standard. All the same, the force is somewhat vulgar. For example, take the following extract epigram from Martial. This epigram which starts Pedicatur Eros, fellat Linus... is written in a deliberately vulgar style:
Assem ne dederis crediderisve Lupo (Don't give or lend even a penny to Lupus).
You can also use #1, but as you say, it seems crude. Nevertheless, it is found, especially in late Latin. For example, in the Vulgate we have things like this:
Nolite dare sanctum canibus (Do not give what is holy to dogs.)
So, adapting that to your sentence:
Noli dare mihi ensem at librum.
I see no reason to repeat the verb, since by using at (or ast or sed) you are reversing the intent and it is clear you want the book.