In extremis ( having hypothetically left the dinky refillable tube at the last washroom )
I have cut a 3" corner from a food grade poly bag, and filled it with 'borrowed' toothpaste.
Then rolled down the hypotenuse, reef knotted the ends, neckerchief style, and put that little package within a bank change bag* or similar.
Thorough toothbrushing, whilst enjoying a spectacular view, is one of trail lifes simple pleasures.
* I find them good for transporting solid soap, and all sorts of other things too.. Gives enough containment, but allows air in to prevent sogginess.