There is a method with GDAL (used in C/C++) to edit pixel values of a georeferenced image, maintaining the original file? Or I have to create a new dataset? My goal is to maintain ALL originals metadata, so I think the creation of a new dataset is drawback.
You can edit pixel values using gdal_calc.py creating a new dataset and maintaining all the original metadata. For instance, see this useful example: How to conditionnally assign a new value to pixels of a raster image? Alternatively you can write your own Python scripts to do more complex calculations.