Yes and maybe. Dogs do not "generalize" like humans do so let’s look at things from a human perspective.
You’ve just landed a new job and part of that job is to learn new software. Since you have never used this software, they give you a technical manual to read over the weekend. You can read it while sitting in a chair in your living room, outside under your favorite shade tree, or while sitting in a busy airport.
No matter where we are you still know how to read and comprehend the words.
A dog's brain works differently than ours. They take in all enviormental destractions (new smells, new people, new everything) much more than humans do, so it's almost like learning the behavior all over again. But the good news is, if they've been successful with the behavior in the past, they quickly re-learn the behavior in their new environment.
So the best thing to do is the start with housetraining 101.
- Limit access to one room at at time
- If they are going to be unattended, put them in their crate
- Keep them close by attaching their leash to you or your chair so they can't go off without you.
- Take them outside often and go with them. Have a yummy treat handy or give them tons of happy praise for doing their business outside.
In a matter of days, your dog should be successful in regaining the housetraining they had in their foster home!