Social Security benefits are not pro-rated. To be entitled to a Social Security benefit check for a given month, the person must be alive the entire month. No benefit is payable for the month of death.
This provision has been in the law since 1939 and can be changed only if Congress amends the Social Security Act. None of the congressional committee reports accompanying the 1939 law explain why benefits are not payable for the month of death. Note, however, that a provision in the same law allows Social Security to pay survivors benefits for the entire month of death.
You can return the check to your local Social Security office. If the payment is made by direct deposit, the U.S. Treasury will automatically debit the bank account.