chi is one word, and chi'n is two: chi + yn.
That yn is the same one that's in the contractions mae e'n ... or dw i'n ....
So basically, you use it before a predicate noun or adjective; or before a main/full verb in the present tense. (But not eisiau/isio, which is a bit special grammatically.)
Interesting! I think 'in school' in English implies a particular school - it implies a definite article: the speaker knows which one it is.
As i understand it, 'mewn ysgol' in Welsh implies 'a school' - the speaker isn't saying which school they're working in, so your suggestion isn't, i think, the best translation.
My first language is English, but I'm just learning Welsh.