Is it illegal to grow trilliums in your yard in Ontario?

No it is not illegal. It is only illegal when you harm them. For example, if you pick them or uproot them.