There are two issues here: 1) whether dual-status aliens are eligible, and 2) are people who were eligible for 2020 (or 2019, whichever year was used to determine eligibility for the third stimulus check) but not eligible for 2021, who got the third stimulus check, required to return it? I will try to answer both of these according to my interpretation of the law. (If the answer to #1 is that they are eligible, then #2 doesn't matter for your case, but I would like to address it anyway.) I will focus on the third stimulus check since that's what's asked about in the question, but the text of the law for all three rounds of stimulus are similar, so the answers will likely apply to all three.
First, let's consider whether dual-status aliens are considered eligible individuals for the stimulus tax credit and the advance refund (the check). The law for the third stimulus check is 26 USC 6428B, as added by section 9601 of the American Rescue Plan Act (text here). Subsection (c)(1) says:
(c) Eligible individual.—For purposes of this section, the term
‘eligible individual’ means any individual other than—
(1) any nonresident alien individual,
[...]
So the question is whether a dual-status alien is a nonresident alien. 26 USC 7701(b) deals with the definition of resident and nonresident aliens. Specifically, in subsection (b)(1)(B), nonresident alien is defined as:
An individual is a nonresident alien if such individual is neither a
citizen of the United States nor a resident of the United States
(within the meaning of subparagraph (A)).
Now, if you look at subsection (b)(1)(A), it says that a resident alien is anyone who passes the Green Card Test, Substantial Presence Test, or makes the First Year Choice. There are special rules for first year of residency and last year of residency, as provided in subsection (b)(2), which can make someone treated as a resident for only part of the year (i.e. dual-status alien). However, a prerequisite of all of those first year and last year rules is that the person must be a resident as defined in subsection (b)(1)(A). So in order for you to be a dual-status alien, you must first pass one of the tests to be a resident in subsection (b)(1)(A), and if you do, then I believe, you are not a "nonresident alien" under subsection (b)(1)(B), since that definition specifically refers to not a resident "within the meaning of subsection (b)(1)(A)", so it should not take into account the other meanings of resident, including the modifications in subsection (b)(2).
Therefore, I believe dual-status aliens are considered eligible individuals for the stimulus. For people who were nonresident at the beginning of the year and resident at the end, they file their tax return on 1040, with a statement for the nonresident part, so they would naturally be processed as a resident due to filing 1040, and they would be able to claim the Recovery Rebate Credit on 1040. However, for people who were resident at the beginning of the year and nonresident at the end, they file their tax return on 1040-NR, with a statement for the resident part, so I am not sure how the IRS would process them as resident, and I am not sure how they would claim the Recovery Rebate Credit since it cannot be claimed on the 1040-NR.
Now let's consider whether someone who was an eligible individual for the past tax year (2020 or 2019) that was used to determine eligibility for the stimulus check, and who received the check, is entitled to that stimulus check if they are not an eligible individual for 2021.
Going back to 26 USC 6428B, as added by section 9601 of the American Rescue Plan Act (text here), subsection (g)(1), which deals with the advance refund, describes a fictitious overpayment for people who would have been eligible for the credit for the 2019 tax year:
(1) IN GENERAL.—Subject to paragraphs (5) and (6), each individual who
was an eligible individual for such individual’s first taxable year
beginning in 2019 shall be treated as having made a payment against
the tax imposed by chapter 1 for such taxable year in an amount equal
to the advance refund amount for such taxable year.
(Subsection (g)(5) provides for replacing the 2019 tax year with 2020 for those who have filed 2020 tax returns before the initial payment determination date.) The advance refund amount is provided in subsection (g)(2)(A):
(A) IN GENERAL.—For purposes of paragraph (1), the advance refund
amount is the amount that would have been allowed as a credit under
this section for such taxable year if this section (other than
subsection (f) and this subsection) had applied to such taxable year
And subsection (g)(3) provides for this fictitious overpayment amount to be refunded as soon as possible (i.e. sent as a check or direct deposit):
(3) TIMING AND MANNER OF PAYMENTS.—The Secretary shall, subject to the
provisions of this title and consistent with rules similar to the
rules of subparagraphs (B) and (C) of section 6428A(f)(3), refund or
credit any overpayment attributable to this subsection as rapidly as
possible, consistent with a rapid effort to make payments attributable
to such overpayments electronically if appropriate. No refund or
credit shall be made or allowed under this subsection after December
31, 2021.
Note that in (g)(1) and (g)(2), both the eligibility and amount for the advance refund are based on the person's 2019 (or 2020) tax year (e.g. it says "each individual who was an eligible individual for such individual’s first taxable year beginning in 2019"). So if you were an eligible individual for the 2019 (or 2020 if you filed before the determination date), then you meet the qualifications for the refund. Nothing in the text of the law requires you to be an eligible individual for 2021 to be eligible to receive or keep the advance refund. You also would not have to pay back any amount with your 2021 tax return, because subsection (f)(1) provides that the Recovery Rebate Credit cannot be reduced below 0:
(1) REDUCTION OF REFUNDABLE CREDIT.—The amount of the credit which
would (but for this paragraph) be allowable under subsection (a) shall
be reduced (but not below zero) by the aggregate refunds and credits
made or allowed to the taxpayer (or, except as otherwise provided by
the Secretary, any dependent of the taxpayer) under subsection (g).
Any failure to so reduce the credit shall be treated as arising out of
a mathematical or clerical error and assessed according to section
6213(b)(1).
So it is my opinion that, if you were a resident alien for 2019 (or 2020 if you filed before the determination date), and you received a stimulus check based on that, even if you are a nonresident alien for 2021 (completely a nonresident alien, not just dual-status), the amount you received was still correct and you do not need to return any of it.
I am aware that in this IRS's FAQ on the third stimulus check, it says that if you are a nonresident alien for 2021, you are not eligible for the check and have to return it:
Do I qualify for the third payment if I’m a resident alien? (added
March 26, 2021)
A person who’s a qualifying resident alien with a valid SSN is
eligible for the payment only if he or she is a qualifying resident
alien in 2021 and may not be claimed as a dependent of another
taxpayer. A nonresident alien in 2021 isn’t eligible for the payment.
An alien who received a payment but isn’t a qualifying resident alien
for 2021 should return the payment to the IRS by following the
instructions as described in Returning the Economic Impact Payment for
instructions.
However, this seems to be inconsistent with the text of the law, which says that the eligibility and amount of the advance refund are based on your 2019 (or 2020) tax year, and does not depend on your 2021 tax year. Unless and until someone shows me a credible legal reasoning based on the text of the law or court rulings that support this IRS answer, it is my belief that this IRS answer is wrong.