The Laws of Stealing and Robbery (14)
1) If a damage has happened to someone, it is forbidden for him to remove it from himself if by doing so he is pushing it on to someone else, as it is forbidden for a person to save himself by causing monetary loss to someone else. However, before this damage has actually taken place, one may push it away so that it will not happen to him even if by doing so it will go to someone else’s property. (Kitzur Shulchan Aruch 183)
2) An example of this would be if someone sees a flood of water approaching his field he may build a wall around his field even if because of this the water will flood someone else’s field. However, once the water has entered his field, it is forbidden for him to take them out of his field in a way that they will flood someone else’s field.