You really can. In fact, if you want to lose a couple of kilograms quite quickly, you can just adjust your caloric intake to 0 for a day or so. I’m not necessarily recommending this strategy (although I do use intermittent fasting myself) but it is a quick & easy proof.
The claim you might have heard is that dieting doesn’t lead to persistent weight loss (ie, in the clinical trials, after the diet period is over, the subjects who lost weight gain it back). These trials are typically in morbidly obese patients – I have a feeling there’s something else going on with them that isn’t present in most of us (maybe something genetic, high baseline levels of inflammation, maybe something else).
There was a study I saw recently that showed college students who tracked their weight managed to avoid the typical weight gain associated with starting school (“the freshman 15” we called it at my university).