Yes of course. But you shouldn't expect that they will be friends or get along, each animal would need it's own safe area, a cat can easily scratch and damage a ferret eye and a ferret is quite capable of harming a cat as well. I've had ferrets that think cats are friends, my current two view the cats as food. I've taken in ferrets in the past for trying to kill kittens, from people who couldn't be bothered to separate their pets.
You can have cats and small animals living in the same house but keep them separate from each other if possible and do not let them play with each other even with supervision. Many cats view small animals like ferrets, mice, rats, etc as prey to hunt or play things. Some larger critters like ferrets and rats can bite pretty hard so it's possible that they can cause injury to a cat.
Ferrets are predators/carnivores and cats usually show them "professional courtesy" and don't try to hunt them. Some ferrets, on the other hand, will try to hunt the cats!
Of course it's like any 2 animals and you may have individuals that don't get along. But usually cats and ferrets get along pretty well.
BUT. Ferrets are social animals and you should have at least 2 even if they get along with the cats. Also be very very sure that you're prepared for a ferret, because they aren't as easy as you might think. Read every ferret website you can, and either have them insured or start putting money away every month, because they usually get an expensive disease when they get older.
Ferrets are notorious for getting into things they shouldn't, and are masters of hiding and getting out, they are that smart and that fast. ALWAYS check your dishwasher and your washing machine/dryer before starting, to avert tragedy like that of my friend. Of course, we all should be doing that.....