It has happened to me 2 or 3 times over 20 years. Chain breaker tools are small and easy to learn how to use so well worth throwing in the bag with the tube and tire irons. You can remove the bad spots and reconnect the chain on the side of the road, just don't try to switch to gear combinations that will overstress the chain (big chain ring/big rear cogs). It will be good enough to last you until you can get to the ship for a new chain though.
The better you take care of the chain, the less likely it is to break. When it dries out or starts rusting the stiff links will create stress points. Bad shifts where you end up getting it pinched somewhere can also dink or bend links to create weak points. Riding with a crossed chain - big front/small back or vice versa also stresses it more than needed so you should avoid those combinations.