They don't pee/poop where they feel like their den area is. If you can do that with your bed you're golden. Bandit always slept in his crate but came from really bad BYB and still had accidents in his crate constantly. However when he was 1 he was allowed to sleep with us occasionally and never once had an accident in the bed. Nala who has never had a single accident in her crate has been allowed to sleep with us occasionally too but has had a few accidents in our bed.
The problem with a young yorkie is they probably won't be able to hold it reliably for 8-9 hours through the night without a break. You might want to consider crate training him/her and then when he's a few months old and doing well with potty training and able to make it through the night move him to your bed. You don't wont to be in the position where he's used to being in your bed every night but having constant accidents so you have to crate him but he refuses to sleep in a crate
.
Good luck and congratulations on your future yorkie