I wouldn't do the scolding - even gently at this point. My intuition says either she's doing this because she can't help it (feeding time, change of foods) and in that case the scolding is really unfair; or she's doing this because she's confused about her new world and in that case the scolding can aggravate the issue.
Taking the first potential problem (can't help it):
does she poop at all when you take her outside in the evenings after dinner? Or does her pooping (outside of the problem poop) happen pretty much in the mornings?
Make note of how long after mealtime she has first first poop and then how long between each poop after that (how many times) and when she seems to be done for the day. It's not just the first poop after eating that can be a problem - even if you get that happening at a more convenient time, her next poops could happen in the middle of the night. Knowing when and how often she poops in connection to mealtime will help you work out a feeding schedule that will fit her needs and be convenient for you.
To provide an example of this, I'll use my shepherd rescue. I tried feeding her around 6 p.m. and she would have to poop around 2-4 in the morning. The rest of the day, she would do another poop or two during the day between 8 a.m. and noon. I changed her mealtime to 1 p.m., that would give her the first poop between 9-11 p.m. which was good. However, she would have additional poops between 3 am and 7 a.m. which wasn't good.
So I fed her at 7 a.m. and her first poop was between 3-5 p.m. and her additional poops were between 9 pm and midnight which was much better for my schedule (I'd rather stay up til midnight then get up at 6 a.m.).`
With the second potential problem (confusion):
Where did she sleep at the foster home? My guess is that she didn't sleep on a person's bed, but in a crate or dog bed on the floor - and she probably didn't have any accidents then. She had a place and it was very well defined.
Now, she's in a new home. She has a canine sibling and I'm guessing they both sleep on the bed with you. Now, she doesn't quite know where she fits and she's trying to define it using dog language (pooping). In this situation, you want to help define her fit. A crate can work.
You can also use dog cushions. If both dogs are sleeping on the bed, I would get two small soft dog cushions and put them in specific places on the bed. Each dog sleeps on their cushion in their specific location every night. This tells her that "this is MY space". You might even try rubbing each cushion all over the dog who it will belong to - this will transfer their scent to that cushion before they use it. Be consistent and don't let them wander off their cushions during the night and don't let them sleep on the other dog's cushion. This can quickly stop her need to poop in the bed because YOU will have defined their spaces - and she doesn't need to try to do so herself.