Adding to the other answers here, how do you know someone is stupid anyway? Whatever that might mean.
There's a nice story about Shantideva. To the other monks he seemed to do nothing but eat, sleep and defecate. But he was actually a highly accomplished practitioner. As they discovered when they asked him to recite a sutra, expecting that this would humiliate him.
Enlightened beings have nothing to prove and no reason to appear as anything wonderful to others around them.
As for the original question - well to follow the Buddhist path anyway - you need to be able to understand meditation instructions and the basic idea that the Buddha taught the origin of suffering and the path leading to cessation of suffering.
For some of his first disciples, they needed nothing more than that. Didn't even need to hear the Buddha taught - it was enough to be told about his teachings by hearsay from someone who had heard them.
So - pretty minimal requirements really. But - still, it's hard for animals. Not easy to see how you could explain to a dog or a cat how to mediate, or the basic teaching on the origin of suffering. Or indeed, a very young baby.
So - not that they can't be enlightened. Plenty of tales of bodhisattvas and Buddhas taking birth as animals. But - not easy to receive the teachings and to become enlightened as a result as an animal. Mostly - they say - that for animals then they can make connections with the teachings. Even trivial seeming ways like encountering a sculpture or a scripture, that they can't possibly understand - but they've made that connection even so which can ripen in a future life.
Or indeed a connection like that with people who can help them. Is a nice story of the Buddha and the frog, if you haven't heard it. In traditional teachings so assuming Indian cosmology. Anyway - while the Buddha was teaching, a frog happened to be listening to the teachings. Of course it understood nothing. But a monk happened, without seeing it, to put a staff through the frog, killing it instantly. The frog instantly took rebirth as a deva - a god like being - this can happen, it's not always a long process from birth to rebirth. And he was still listening to the sound of the Buddha's voice, and had the intelligence and awareness and understanding of a deva so could immediately understand what was being said, and listening to the teachings, heard and understood and became enlightened on the spot.
Also - you need to have some connection with or appreciation of suffering. Otherwise the teachings just don't seem relevant enough. Why do anything about the origins of suffering when everything is great and you are having a wonderful time? So - in Indian cosmology you have the idea of the god realms - where things are just so wonderful and easy and for billions of years you just experience pleasant surroundings, everything great. In a situation like that especially, it would be hard to follow the path to enlightenment. (Unless perhaps you have just that moment been born as a deva as a result of a frog dying, and listening to the Buddha teach at the time, I think was pretty lucky there).
Though - there are ideas of Buddha pure lands - where everything is kind of vividly awake and continually presenting the message of enlightenment to you - that's a little different. In those, the pure land sects you enter the ambit, as it were, of a Budha who has become enlightened and everything you experience has his or her blessing. So - if such exists, as they believe in the pure land sects, that's a bit different.
Similarly also - if you are clever - but in extreme suffering so you can't give any attention to anything else except your pain and suffering - again it is hard to practice the Buddha's teachings.
And also - of course you have to meet the teachings. And you may be by upbringing prejudiced against them. E.g. brought up to think that killing people is good, just in itself, shows how tough and strong you are, e.g. some kind of gangland culture - you might find it hard to see any point in the teachings. They talk about "cut off" people who by upbringing are cut off from the Buddha's teachings even when they are available.
Of course this is not just the formal teachings, but other types of teaching also anything leading to compassion, wisdom, openness - they may be available but because of your upbringing you don't see any point in them, and turn away from them when you encounter them.
So all those issues. But intelligence, not a major factor so long as you have enough intelligence to understand the basic teachings. Memory not important either - if you can remember a simple instruction or teaching, that's all you need to practise.
It can sometimes be a handicap, to be too intelligent, you can sometimes over complicate what is a simple message in essence. (It doesn't have to be a handicap of course, can be used well as with all our qualities - but sometimes - it's like you are clever in one way, but in other ways you are really rather stupid - but don't see it - and because you are so agile intellectually, you can manage to convince yourself that you understand the teachings, find it rather easy to do that in fact, when you don't really).