Dogs should be house-trained as puppies; 3 years old is very old to start training the dog. It is sometimes said that you can't teach an old dog new tricks. I would suggest that the dog should be kept outdoors, in a dog house. If the dog house is small (which would normally be the case) the dog will not foul it. Most animals do not foul their own nests. Alternatively, keep the dog in a small cage in the house, and when it wants to defacate (which it will signal by whining) you can take it for a walk. It may eventually get the idea.