Not a native, and I'm not 100% sure, but I think contractions of the leading "y" in two letter words like "yn" and "yr" are mandatory. E.g., Dw i yn hoffi yr afal is wrong and it has to be dw i'n hoffi'r afal.
Sort of like French; "je aime, uses the right words, but it's wrong like that and it has to be "j'aime."
Interesting theory, although I am not sure I understood it. The only "y" in "Dw i yn hoffi coffi a dŵr" is in "yn", why would that be shortened to "Dw i'n hoffi coffi a dŵr"? ☺
In this discussion (https://goo.gl/rHWcUG) I asked the same question. Ellis Vaughan, native in Cymraeg, argues that "dw i yn" "..is strange...", rare and often replaced by "dw i'n" in practice. She/he also argues that Dewi Lingo shouldn't been teaching us "dw i yn", but is it and even recommended. In this unit (https://goo.gl/EKlNAQ), there is a task to translates "Nac ydw, dw i ddim hoffi swper" to "No, I do not like supper".