It's up to the bank to decide whether to accept a deposit with a different name. Some banks allow it, or don't even check the name, and some banks don't allow it. Ask your bank.
If the bank rejects the direct deposit because the name doesn't match the account, the IRS will mail you a check for your refund.