First off, I'd caution the jump to conclusion in title: There's a reason we re-named VIIP to Spaceflight Associated Neuro-Ocular Syndrome (SANS) - because while we suspect there's elevations of ICP going on, there's still little direct evidence of it and a suspicion that if there is, the ICP elevation alone is likely not sufficient to explain the syndrome in its entirety. We've never done direct ICP measurements in microgravity, and so the explanation of ocular findings in space based on what we'd associate with those findings were we to see them terrestrially is something to be cautious of. We HAVE done a small number of post-flight direct ICP measurements on long-duration astronauts, and some of those values have been moderately elevated.
I'd also REALLY caution against connecting the reports of headaches on orbit with SANS - we have good correlation between headache reports and ISS atmospheric CO2 levels (which vary throughout a mission based on a variety of factors), and CO2 may or may not be related or contributory to SANS. Certainly there's no suggestion among the current medops community that crew-reported headaches are in any way directly related to elevations of ICP.
See Lee, A. G., Mader, T. H., Gibson, C. R., & Tarver, W. (2017). Space flight–associated neuro-ocular syndrome. JAMA ophthalmology, 135(9), 992-994. for a decent catch-up on where we are now currently in our classification of this syndrome.
In brief, the evolution in our understanding of SANS over the last decade has gone from a primary concern with globe flattening and fundoscopically obvious optic disk edema that appeared present in some astronauts, but completely absent in others, to a current understanding based on improved imaging methods such as in-flight Optical coherence tomography (OCT) that suggests this is a spectrum of adaptive (and maladaptive) changes to microgravity that can be observed in every astronaut, with changes observable very early in the mission (within the first few weeks).
The question of why some astronauts go on to develop clinically significant disk edema while others get relatively mild choroidal thickening, while others develop choroidal folds but lack significant disk pathology, while others develop optic nerve sheath diameter thickening and lack other findings, is still open. We suspect there's some underlying anatomical differences that will eventually allow us to predict who's at risk for the more severe clinical changes, but right now the only astronauts we can predict response for are those who have previously flown (because if you've developed clinically significant findings before, we expect you to again).
To the second half of your question, the easy answer is we're just not sure yet because the answer to "how much gravity is needed to offset SANS development" is going to be driven by whatever the underlying physiological mechanism is, which we still haven't identified. I can say that most physicians working this problem would probably agree that ~0.38 G is likely enough to address the impaired cranial venous drainage that comes with microgravity, and if that is the primary upstream contributor to SANS then I'd expect it to address that as well. When you start speculating about whether lunar gravity would be sufficient, you'll get less consensus.