|Image is from the CDC and is copyright free|
This is in fact an infection of the nematode worm Thelazia callipaeda. It is commonly called eyeworm, for obvious reasons, but the technical term is thelaziasis. This is an abnormally large infection, with numerous worms present. It is transmitted by insects that like to feed on, basically, tears and is known to occur in humans, though it is more common for humans to become infected by other species in this genus. Treatment for canines is a topical medication, while in humans the worms will be removed by hand and then eye drops are used to prevent secondary infection.
Source is the CDC.