I'm not certain of the legality, but I don't see how such a thing would be physically possible. Even the smallest species of elephant, the African forest elephant, reaches a height of at least eight feet and weighs six thousand pounds. The other two species, the African Bush elephant and the Asian elephant, are even bigger, and those are the more likely species to be found in captivity. In comparison, the standard height of a door is less than seven feet, and surely no full grown elephant could even enter a normal house.
But even if you were to suppose the home was built to accommodate an elephant's size, it would be a completely unsuitable home for a elephant. Elephants require an enormous area, literally hundreds of acres, to roam in order to maintain their health. If they don't have that kind of area, they tend to get obese, and when standing on hard artificial surfaces like concrete, rather than natural earth, they tend to get sores on their feet and other problems. And this is just the start of their many health problems that come as a result of giving them such inappropriate living conditions. As a result, elephants in captivity have a very short lifespan on average in comparison to their wild counterparts. In fact, elephants tend to do so poorly in captivity, that it is now at least somewhat controversial to keep them in even a reputable zoo setting.