Steroid use wasn't banned by the MLB until after Canseco's career.
Note, however, that steroid use was made effectively illegal on a federal level in the United States in 1990. The 1991 date above references a memo from the commissioner that states that illegal drugs are "strictly prohibited". Steroids are mentioned explicitly, though they do not have to be, seeing as how they were in fact illegal.
You can read the memo here: https://www.espn.com/espn/eticket/format/memos20051109