I found this on the Wikipedia page for Rurouni Kenshin: Reflection
Kenshin eventually becomes ravaged by an unknown disease that is much
like leprosy (the writers have admitted there is no medical
explanation for Kenshin's condition[citation needed]). To share his
pain, Kaoru convinces Kenshin to infect her with the disease through
sexual intercourse.
Leprosy is not an std but can be spread through physical contact with a person who is infected. Since it is said that the disease is much like leprosy it could have been transmitted to her when she stayed with him.
As far as canonicity the story was not written by Nobuhiro Watsuki. I'm not sure if this story was considered canon or not but the following is a quote from the Wikipedia
Although Samurai X: Reflection was not written by Watsuki, he stated that he "checked in on the script."[5] Watsuki mentioned not having input in it, and let the director "run wild with it." In response to Kenshin's death in comparison to the happy ending in the manga version, he felt that his own work eventually would have reached Kenshin's death had he continued writing. He had not wished to pursue that line because "Kenshin went through so much crap and deserved a happy ending." He felt that neither version was better than the other because "it's a personal taste thing."[5]