Bonemealing to produce lily of the valley is definitely possible in 1.17.1. I have a flower farm producing lily of the valley which works in 1.17.1, and can find lily of the valley in other areas as well by bonemealing.
After upgrading the world to 1.18, the same areas now produce different flowers when bonemealed. It looks like there is a problem with the flower gradient in 1.18 (see my bug report MC-244716 for 1.18). Maybe this also present in the 1.18 snapshots.
I have actually found some cornflowers spawning and through bone meal in 1.18 worlds, don't know if they're rarer than in earlier versions.