Ukrainian officials said Russian troops were retreating from the northern parts of the country but warned they would escalate the war in the east.