As you said, a difference of one is impossible to detect/record with current image sensors.
First there is the fact that sensor photosites (pixels) do not see color at all, they simply see illuminance from a given spectrum. The color of an image pixel is then calculated based upon the information from that sensor photosite/pixel along with surrounding information. What exactly that calculation determines the image pixel to be (hue/saturation/lightness) will vary with the type of color filtration (wavelength separation) that was used by the sensor, and the formula/demosaicing method used. But given that the idea is to generate an RGB input for a camera using an RGB pixel's output (an RGB "code"), the color filtration scheme/sensitivities, and pixel spacing/density, could be matched/arranged to eliminate those errors; and demosaicing wouldn't be required.
However, there is pattern noise due to PRNU (photosite response non-uniformity) and DSNU (dark signal non-uniformity); which are characteristics of sensors where different photosites generate a different response given the same input. Not only is this variable between photosites, it is also variable within a photosite given different input signals. I.e. it would be difficult/expensive to accurately quantify and account for (but largely possible).
And then there is the read error; this error can be very low in a scientific camera (.1%), but it cannot be eliminated.
Given the nature of the question, it might be more appropriate for a data science/machine learning community?