Yes, preposition usage can often be tricky.
If we're talking about a trade etc or section of a company, we use in:
I worked in scrap metal / the oil industry / plastics / the financial sector // the typing pool.
If we're talking about a company / employer etc, we usually use for:
She works for Boots / Dunbar and Dunbar / Rio Tinto Zinc / Mr Fagin.
If we have a specific location in mind, we use at:
He works at the library / the sugar refinery / the pub.
However, we often use metonymy to shorten 'the high-street Boots shop' to 'Boots', and so 'He works at Boots' is also common.
Similarly, you may regard University say as the institution or the physical manifestation: 'He works for / at the University.' Note that these can have different meanings - he could work for the University interviewing candidates at a different location, or he could work (for a time) in the University trying to prove there have been improper relationships between tutors and students.