An apparatus for treating water or liquids in general, comprising: a reverse osmosis filtration device provided with at least one inlet associated with a supply line for supplying the liquid to be treated, at least one permeate outlet associated with a delivery line for dispensing the treated liquid, at least one concentrate outlet, associated with a discharge line for discharging the waste, downstream of said filtration device, at least one tank having two adjacent chambers (9a, 9b) with a mutually variable volume; one of said chambers being connected to said delivery line, the other one of said chambers being connected to said discharge line, said at least one tank comprising a substantially non-deformable enclosure that contains an elastic and waterproof membrane that is adapted to separate said two chambers (9a, 9b); said chamber connected to said delivery line being provided with a first opening which has a fluid connection to said permeate outlet; said chamber connected to said discharge line being provided with a second opening with a fluid connection to said concentrate outlet and with a third opening associated with said discharge line, a first flow control means arranged upstream of said second opening, said first flow control means comprising at least one shutoff valve that is adapted to pass from at least one closed condition, in which it interrupts the fluid connection between said concentrate outlet and said second opening, to at least one open condition, in which the fluid connection is not interrupted; the transition from said closed condition to said open condition being controlled by the pressure variations of said delivery line, and a second flow control means arranged downstream of said third opening, said second flow control means comprising a seat, provided substantially at said third opening, which cooperates with a flow control element that can move between at least one closed position, in which it interrupts the fluid connection between said third opening and said discharge line, and at least one open position, in which the fluid connection is not interrupted; the transition from said closed position to said open position being contrasted by an elastic means. a reverse osmosis filtration device provided with at least one inlet associated with a supply line for supplying the liquid to be treated, at least one permeate outlet associated with a delivery line for dispensing the treated liquid, at least one concentrate outlet, associated with a discharge line for discharging the waste, downstream of said filtration device, at least one tank having two adjacent chambers (9a, 9b) with a mutually variable volume; one of said chambers being connected to said delivery line, the other one of said chambers being connected to said discharge line, said at least one tank comprising a substantially non-deformable enclosure that contains an elastic and waterproof membrane that is adapted to separate said two chambers (9a, 9b); said chamber connected to said delivery line being provided with a first opening which has a fluid connection to said permeate outlet; said chamber connected to said discharge line being provided with a second opening with a fluid connection to said concentrate outlet and with a third opening associated with said discharge line, a first flow control means arranged upstream of said second opening, said first flow control means comprising at least one shutoff valve that is adapted to pass from at least one closed condition, in which it interrupts the fluid connection between said concentrate outlet and said second opening, to at least one open condition, in which the fluid connection is not interrupted; the transition from said closed condition to said open condition being controlled by the pressure variations of said delivery line, and a second flow control means arranged downstream of said third opening, said second flow control means comprising a seat, provided substantially at said third opening, which cooperates with a flow control element that can move between at least one closed position, in which it interrupts the fluid connection between said third opening and said discharge line, and at least one open position, in which the fluid connection is not interrupted; the transition from said closed position to said open position being contrasted by an elastic means.