There are different kind of sedatives, anaesthetics, narcotics used for surgery, depending on the health state, age, and the duration of an operation, the use of other medics and so on. It has a reason why there is always an anaesthesist in an OP room.
So, different drugs will cause a different depth of coma. In a study here 300 persons were tested for their coma depth (bispectral index) during an operation and were asked for dreams afterwards. 22% of them, mostly young persons, males and people who often dream while sleeping notmally, said they were dreaming. All patients were in almost the same depth of coma.
This is quite interesting, as usually we only remember dreams we had while REM phase, and REM phase is close to waking up naturally. Of course they did not have “rapid eye movements” when being in a reversible coma, neither they were close to wake up naturally.