Under what basis does the Catholic Church consider animals, in particular great apes, not to be persons? The Catholic Church teaches that out of earthly beings, only humans, and not animals, are persons and therefore many rights, like the absolute right to live, are enjoyed only by humans.

As the CCC says,


  2417 God entrusted animals to the stewardship of those whom he created
  in his own image. Hence it is legitimate to use animals for food
  and clothing. They may be domesticated to help man in his work and
  leisure. Medical and scientific experimentation on animals is a
  morally acceptable practice, if it remains within reasonable limits
  and contributes to caring for or saving human lives.
  
  2418 It is contrary to human dignity to cause animals to suffer or die
  needlessly. It is likewise unworthy to spend money on them that should
  as a priority go to the relief of human misery. One can love animals;
  one should not direct to them the affection due only to persons.


And notably, the above canons are placed in a chapter whose title is:


  II. Respect for Persons and Their Goods


If I’m not mistaken, this position stems from the definition of “person” proposed by Boethius, which is most commonly accepted among theologians:


  A person is an individual substance with a rational nature.


The problem is that some modern scientists claim that according to the new research we must consider some animals, in particular the great apes, as self-aware and intelligent, and therefore persons. They assert that these animals are also capable of self-control, planning, abstract thinking, mental time travel, comprehending past, present and future, empathy, establishing relationships, etc. They assert these animals are sentient.

Therefore these scientists claim these animals should be granted the right of bodily liberty, bodily integrity, and must not be considered properties of other people.

For sources, please see e.g. the following Wikipedia articles: Great ape personhood, Nonhuman Rights Project and Personhood § Non-human animals.

By such mentality denying animals human rights is an example of an unmadated supremacism, chauvinism and discrimination, similar in nature to the historical discrimination of people born as slaves and later of people of other races.

Yet under the Church’s teaching it would seem impossible to classify these animals as persons. Given these scientific claims, seemingly fulfilling Boethius’ definition of a person, how does the Catholic Church defend its teaching with regard to animals not being persons?
Humans have the gift of free will given directly by God [CCC 1730], as well as a soul [CCC 1703]. Only humans have an immortal soul.

Many higher mammals have the traits you speak of: wolves, most domesticated dogs and cats, dolphins and porpoises, and most primates. Sentience is not a function of humanity. 

Scripture specifically makes humans special from the time of creation: 

Genesis 1:26 And God said, "Let us make man in our image, after our likeness,  and they shall rule over the fish of the sea and the fowl of the heaven, and over the animals and over all the earth and over all the creeping things that creep along the earth. 27: And God created man in his image; in his image he created him; man and woman he created them. 28: And God blessed them, and God said, "Be fruitful and multiply and fill the earth and subdue it, and rule over the fish of the sea and the fowl of the sky and over all the beasts that tread upon the earth.

CCC 1704 goes on to say By free will, [man] is capable of directing himself towards his true good.

In these regards, both scripture and Catholic theology recognize the supremacy of humans over all other species on the planet.

I'm not sure if this is a defense, per se, as you have asked, but God was very specific about the supremacy of humans. Of interest, cultures which are not monotheistic have by and large less empathy towards nonhumans than the Church. If anything, Catholic theology supports animal rights and the relief of suffering as long as it is not to the detriment of humans [CCC 2415-2418].

To sum up, sentience, if present,  is not a substitute for humanity. (Of note, the CCC specifically prohibits slavery of persons [CCC 2414].) Your argument that "some modern scientists" believe sentience makes a nonhuman a "person" is not a replacement for scripture or dogma.