Ask your DM
The infusion feature says:
Whenever you finish a long rest, you can touch a nonmagical object and imbue it with one of your artificer infusions, turning it into a magic item.
Infusing a veteran's cane
The veteran's cane, as long as it is still a cane, is a magic item and therefore cannot be infused. So if you want to do that, the story ends here: it cannot receive an infusion, and without infusion, you cannot transform it while bearing an infusion into a sword to use as a focus.
Creating a magical sword by infusion
So, what if you first transform it? Once it is transformed, it turns into an ordinary sword, and is no longer magical. A sword is also an object. This nonmagical object can be infused. Let's assume you infuse it with an infusion that works on a longsword. Then (TCoE, p. 11):
After you gain the Infuse Item feature at 2nd level, you can also use any item bearing one of your infusions as a spellcasting focus.
Once infused, the sword is bearing one of your infusions and thus can act as your spellcasting focus. That would work, for example, you could use the enhanced weapon infusion to also get a +1 (or higher) bonus to attack and damage rolls, and a magical weapon.
It does not matter that the nonmagical sword used to be a magic item at some point in the past. The Infuse an Item feature checks if the object is a legal target at the time when you try to infuse the item. It does not travel back in time to check what might have been the case before then.
Creating a veteran's cane by infusion
PS. @draconis pointed out there is yet another scenario, you start with a normal cane, and turn that into a veteran's cane (which you can because Replicate Magic Item allows any common item in the game). In that case, once you transform the infused veteran's cane, it turns into a normal, non-magical sword. The rules say that
Your infusion remains in an item indefinitely, but when you die, the infusion vanishes after a number of days equal to your Intelligence modifier (minimum of 1 day). The infusion also vanishes if you replace your knowledge of the infusion.
You neither died nor did you replace your knowledge of the infusion.
The transformed staff might still be the same object, just transformed, so the infusion might still be "in" it. At the same time, this now is not a magic item any more, and normally infusions are always magic items.
I think this corner case is sufficiently unclear to better ask your DM how they want to handle it.
To me it wouldn't seem overpowered if you can use a normal sword as your focus and hit people with it too, in exchange of giving up one of your infusions, so I would probably allow it. This would be much worse except in corner cases than just getting a magical sword by infusion.
Conclusion
You can infuse a normal sword (that used to be a magical cane) and then use that magic item as your focus. You can infuse a normal cane to become a veteran's cane, and should ask your DM if it still is infused once you turned that into a normal sword.