While Xiahou Dun is recorded as being one-eyed, the part about eating his eye does not appear in "Records of the Three Kingdoms", the historical records of the three-kingdoms period as opposed to the dramatized "Romance of the Three Kingdoms".
Xiahou Dun is a minor minor character in "Records of the Three Kingdoms" his actions are not very detailed. While he might have done it, no historians wrote it down. So it's safe to say the part about eating his eye is a fabrication by Luo Guanzhong.
Any historical issues aside, pulling out your own eye seems anatomically improbable, to put it lightly.
The human eye is pretty well secured into the skull by a variety of muscles and ligaments. While it can be damaged by crushing or piercing injuries, actually removing the eye intact is a fairly involved operation -- you need to cut through or around the sclera, then sever the six extra-ocular muscles.