The best treatment to keep water out of a masonary wall is to paint that wall on the exterior with a latex MASONARY PAINT or an ELASTOMERIC COATING, depending on what the problem is.
The worst thing you can do is seal up a masonary wall to prevent moisture from evaporating from it. That's cuz preventing moisture from evaporating out of the wall doesn't prevent moisture from getting into that wall. The result will be that moisture will continue to accumulate under the sealer, and if you have cold temperatures that result in that moisture freezing, you can have the masonary of the wall crack due to internal pressure. This kind of cracking due to the internal pressure caused by expanding water inside the masonary is called "spalling", and it's characterized by the masonary breaking off in "flat"ish "chips" from the surface of the masonary.
If there is a crack in the masonary that allows rain water to get in, and repairing that crack with brick mortar or whatever isn't feasible because the crack is opening and closing as the building moves and shifts, the best fix is an elastomeric coating. An elastomeric coating is a thick plastic paint that's made of the same plastic as the toy called "Stretch Armstrong". This is a plastic that can be stretched out of shape, but always reverts back to it's original shape once the force keeping it deformed is removed.
So, an elastomeric coating will stretch to span the gap across the crack when it opens, but will shrink back into shape again when the crack closes.
Masonary paints are exterior latex paints that are chosen because of their "breathability", with is the ability of a paint to allow H2O molecules to pass through the paint. The higher the breathability, the easier it is for H2O molecules, but not liquid water, to pass through the paint film. You can consider a latex paint resin as a metal wire scrunched into a ball. As long as the gaps between the wire segments in that scrunched up wire are wider than the diameter of a single H2O molecules, but smaller than the distance between H2O molecules in liquid water, then only individual H2O molecules can pass through the paint.
The whole idea behind masonary paints is that they allow any moisture that gets into a masonary wall to evaporate out of the wall through the masonary paint, but they prevent rain from penetrating into the wall through the paint. Thus, they allow the wall to dry out, but don't allow rain water to penetrate into the wall through the paint.
So, if you want to do something to a masonary wall, be careful what you do because it's easy to get into the trap of thinking that if you prevent the moisture from getting out, that'll stop it from getting in. That's not true, AND if the moisture inside the wall accumulates and subsequently freezes, it can cause a lot of damage to the wall.
Any paint store will sell both masonary paints and elastomeric coatings.