Get Info for the folder (ctrl-click), and at the bottom of the "file Description segment, tick the box labeled "lock". it will now have a small grey padlock on the icon, and with not let you trash it.
You can only modify folders in this way if you have the permission of the system to do so. it sounds like you are trying to lock system folders like the Library, which are not lockable, by default, and shouldn't ever be locked. these folders though will warn you by requesting Admin passwords before you modify them...