It's not just about the possibility of swallowing some toothpaste but also about the taste even just confined within your mouth sending the wrong signals, confusing the body and bringing forth undesirable reactions detracting from the optimal fast... for example signaling the stomach to prepare for digestion when ideally no such preparation should be taking place and sometimes stimulating appetite rather than allowing it to naturally go dormant.
Therefore:
Is it good to brush? Yes
Is it good to use toothpaste? No
Wishing you a harmonious and highly beneficial fast :).