"I have a headache."
Translation:Mae pen tost gyda fi.
An excellent question. The way it works is that a specific, localised pain, such as a headache, a sore tummy etc is associated with 'I have' eg 'Mae pen tost gyda fi', 'Mae bola tost gyda fi.'
While a more general pain or illness is 'on me' = 'arna i' (or more formally 'arnaf i') Therefore a cold is 'on me' 'Mae annwyd arna i'.