Of course it is. Why do you think preserved jams and jellies work? Bacteria love sugar as much as any other creature but it's a preservative in large quantities.
I don't think it is much different. The definition of "toxic" is "poisonous", which is really anything that (chemically) damages an organism. Anything that interferes with a biological process is toxic, no matter if it's by dehydration or some other more complex mechanism.