Can hydrogen bonding occur if both O and H are in a ring having 6 members however the ring is concave . Example 3 hydroxycyclohexanone
It doesn't work. The ring geometry holds the carbonyl oxygen and hydroxyl hydrogen too far apart. If you have a molecular model kit, construct the molecule with it and see what happens to the oxygen and hydrogen atoms.
Hydrogen bonding between different molecules is not constrained by the ring geometry, and thus works perfectly well.