Officially, there isn't a way to keep a pet in Animal Crossing. The only route people point to is hacking your game—though that comes with its own risks and isn't something the game supports. If you're set on it, look into communities like DarkACCF for more information, but go in knowing it's outside normal gameplay.