Is it illegal in BC Canada for an ex employer to give a bad reference?

Not at all, if the former employer was disatisfied they have every right to inform future employer, if asked.