"Are you a teacher?"
Translation:Athro dych chi?
Why would the preposition "yn" be required here?
It's not preposition yn (which wouldn't contract, as far as I know); it's the yn that joins a form of bod (to be) to a predicate -- that is, the same yn in dw i'n cysgu (I'm sleeping) or dw i'n hapus (I'm happy) and also in dw i'n athro da "I'm a good teacher".
It's debatable whether it is a preposition. It's sometimes classified as a 'particle' but that really means 'wee word we are not sure how to classify'. GPC suggests it may come from the preposition that means 'in'. If it doesn't then no one knows where it comes from. The word used in the identical construction in Gaelic (but only with verbal nouns) is identical to the preposition that means 'at' and is usually calqued as such:
Tha Sioned ag òl (t is silent)
Mae Sioned yn yfed
Sioned is at drinking
Since the verb-noun is regarded as grammatically a noun (with even clearer evidence in Gaelic that it is) then it makes sense to call the word before it a preposition. The only confusion is that that does not make quite as much sense when yn is followed by an adjective. I presumed that is a derived used as it does not occur in Gaelic or Irish.