Yes, in my experience they certainly can. Before I even know I am going to get ill I often experience an inexplicable gain, and when I am ill, I can experience significantly higher losses - but neither are permanent.
Don't worry. It will be temporary. Your body is producing all sorts of stuff to fight infection and you'll be retaining water because your body will be resisting dehydration. As long as you don't use the illness to dive offplan it will be gone once you recover.
Drat! Woke up today smothering with a cold. Ugh. Scales in the bathroom say I've lost but those scales like to tease me with gains and losses all the time, and they're very rarely right lol WI tomorrow! We shall see!