If I place a small siddur/bencher/sefer inside an envelope or Ziploc bag and then inside my jacket pocket, would that be sufficient protection in order to enter a lavatory? Would the same apply to a Klaf with Shem HaShem written on it?
Yes, this is fine, because the material has two covers.
See Mishnah Berurah 43:25.
See also Piskei Teshuvos 43:13 who explains that there is room to be lenient with printed material even with one cover (such as in the pocket) alone.