Yes, a fossa can swim.
The fossa ( Cryptoprocta ferox ) is a carnivorous mammal native to Madagascar, and it possesses the ability to swim. While they are more commonly known for their terrestrial locomotion, including running, leaping, walking, and stalking, they are also capable swimmers.
While there's limited detailed documentation focusing solely on their swimming habits, the fact that they can swim indicates an adaptability to various environments within their habitat.