Sorry for the long response but basically it's impossible to terminate a player's contract simply for testing positive for illegal substances. Now if a player had previously tested positive, refused to abide by the league's substance abuse policy and kept using then there are steps the teams can take but they are specific, tiered steps. Recovery is difficult so if players struggle with sobriety their job is safe if they're really committed to the process. On the other hand, if a player is just straight-up uninterested in recovery they have bigger issues to worry about than a pro hockey contract and teams do have the ability to separate that player from the locker room. Again, that's done with specific behind the scenes steps, not just immediate termination. No one knows how many players are currently in the substance abuse program without any of us ever finding out or seeing any discipline(nor should we know)
You can probably find more specific info on the league's substance abuse policy policy from around the time of Kassian's suspension but there's honestly not that much info out there. It's an internal program agreed to by the NHL and PA and the details aren't publicly available.