An apparatus for ultrafiltration of a patient being overhydrated due to congestive heart failure. The apparatus comprises a dilution syringe (16, 57) for removal of a portion of peritoneal fluid from the peritoneal cavity. A glucose bag (25, 71) comprises glucose concentrate at a concentration of 30%. A small amount of glucose concentrate is mixed with the dilution fluid in the dilution syringe in order to dilute the glucose concentrate to below 3% concentration. Then, the mixture is filled into the peritoneal cavity from the dilution syringe in order to replenish the glucose in the peritoneal cavity for maintaining a substantially constant glucose concentration in the peritoneal cavity. In addition, peritoneal fluid is intermittently removed from the peritoneal cavity for counteracting increased intraperitoneal fluid volume and increased intraperitoneal pressure due to ultrafiltration. A UF bag (24, 55) is arranged for receiving such surplus peritoneal fluid. A glucose syringe (59) may be arranged for metering the glucose concentrate.