My last day of menstruation is having a foul odor, is that normal? If it is not what's the medicine to treat it??

Depends. Old blood at the ends of a cycle may have an odor. An infection, like BV can also cause a bad odor sometimes described as fish-like. If you have pain, itching or burning with this odorous discharge, check it out! Metronidazole is often used to treat BV.