What slimy creature was once used by doctors to drain bad blood from sick patients?

The slimy creature you're thinking of is a leech.

Leeches were used in medicine for centuries, particularly during the Middle Ages, as a way to "bleed" patients. The idea was that by removing blood, doctors could get rid of "bad humors" that were thought to be causing illness. This practice, known as bloodletting, was widely used for a variety of ailments, even though it was ultimately ineffective and often harmful.

While leeches are no longer used for bloodletting, they are still used in modern medicine for specific purposes, such as reducing swelling after surgery.