If a paper or software is released to the public, can the university still file a patent?
Yes, in most cases, dissemination of a patentable invention by academic publication (papers, talks, code) constitutes prior art and will result in a later patent application being rejected. That is why people and institutions who intend to patent their discoveries are very careful about what they publish, and when. (Basically, publish after the patent application is field.)

Regarding your patent evasion scheme, it would probably work in practice, but could lead to severe retaliation from your institution. You said yourself that the policy is to report all patentable inventions. By not doing so, and publishing without first enquiring whether your employer wants to patent the invention, you violate the policy... And, given your question, you would be doing so willingly and in bad faith. This sort of thing could get you fired. And, the could get the papers retracted (look at some of the examples of this on Retraction Watch).

Finally, on piece of advice: if you're so afraid that your employer owns the IP you create, enough to look for strategies to remove from them some of the IP they pay you to create, you should consider quitting. It doesn't look like you have a healthy relationship with your employer.