Steroids weren’t against the rules when Canseco was playing.
I’m not a lawyer, and I don’t play one of TV, but I believe using steroids in the manner Canseco did was illegal, even if baseball had no rule against their use.