Oxygen isotopic abundances in evolved stars. III: 26 carbon stars