Ants do have eyes, though how well (and even whether) they see depends on the ant. They also have brains.
You aren't wrong to put quotes around "brain" since in many organisms the nervous system isn't as centralized as in vertebrates, and when they do have concentrations of neurons in various places ("ganglia") it isn't always in the head, and the one in the head isn't always significantly larger than the other ones, so it's often hard to call that having a brain. This can be true of many insects:
Having said that ants do have a centralized nervous system, with the neurons in the head making a larger percentage of their body than most other insects, i.e. they have brains. It appears social insects tend to have larger brains for their body size, which includes bees and ants.
Ants also have eyes; they're just often too small to see clearly, especially when the ant itself is small and the eyes are the same color as the ant's head. Ants descended from wasp-like ancestors that probably had quite good eyes, like modern wasps and bees do. But ants mostly live on and underground and don't need eyes as much as flying, pollinating insects do, and how well ants can see varies a lot between the species.
Or I'll just quote Wikipedia:
Like most insects, ants have compound eyes made from numerous tiny lenses attached together. Ant eyes are good for acute movement detection, but do not offer a high resolution image. They also have three small ocelli (simple eyes) on the top of the head that detect light levels and polarization. Compared to vertebrates, most ants have poor-to-mediocre eyesight and a few subterranean species are completely blind. However, some ants, such as Australia's bulldog ant, have excellent vision and are capable of discriminating the distance and size of objects moving nearly a metre away.
And the cite for that latter example:
ATTACK BEHAVIOUR AND DISTANCE PERCEPTION
IN THE AUSTRALIAN BULLDOG ANT
Those same ants even have color vision it seems. Conversely, African army ants appear to be blind, although even that depends on the caste. From Sociobiology of the hypogaeic army ant Dorylus:
Eyes are either reduced or absent.
Army ant males do indeed resemble wasps, having large and robust bodies and well developed eyes and wings
So it's very possible the ants you ran into could see your fingers.