Maybe there is a way to do this and I don't know it but would it be possible to make it so you can move (specifically cursed/nodrop/noremove) items in your inventory to avoid losing them at logoff?
So, if you're carrying 5 rares for example:
Rare1 - nodrop/noremove/nouncurse and you want to lose it.
Rare2 - droppable, need to keep
Rare3 - droppable, need to keep
Rare4 - droppable, need to keep
Rare5 - nodrop/noremove/nouncurse and need to keep.
the command could be something like:
Inventory move Rare1 Rare5
And basically the slots just replace each other.
This is something I run into maybe once a month so I imagine it's not the biggest problem for anyone else either but if it's an easy change, it would really help. Otherwise, if there is a method to move items that you can't drop, that would help too.
The other idea I had would be to make it so you can add noremove/nouncurse items to a bounty 
Provided that you picked up the noremove item that you want to keep first of the rares, then be a rogue and edge craft the one you want gone, or make an invoker shatter it/a berserker destroy it, if it can be, or you can suicide. I see no other solution to your given problem.
Very simple, stock up on simple rares, drop the ones you want to keep, quit out and hope it is gone.
The ones at the bottom of your inventory disappear. In this case, if you were 50, rare5 would disappear, but you'd keep the rest.
hunt about for enchant armor / enchant weapon scrolls...if you can read em that is..
If you drop the ones you want to keep (thus moving the ones you want to get rid of to the bottom of your inventory) then pick up the ones you want again, they will be back at the top.
It's not the biggest problem - but yeah, it's dealing with an issue when you have two nodrop items and the one you want to keep is below the one you one you want to lose.
enchant scrolls would be your best bet I guess in that situation like Kyzarius said. That's what I'd use.
Well if you wear/remove the item it puts it on the top of your inventory, correct? Thus giving you a logical cycle code already and you don't need another.
No, wearing it and removing it won't move the item.
Well it has for me, mixed with dropping the rares and picking them up(the ones that I can drop). I also do what dobson does and drop needed ones and simply over load with elemental bracelets or something crappy. Play around, I've never been stuck with a rare I didn't want, not once. Except those nasty rings, but I wore those!
Yes, that works. Unless ofcourse you have another item that is nodrop which you do not want to lose, and you can't drop it to pick it up again moving it to the top.