Yes, you can offset the retained earnings account with an accounts receivable. To make sure the transactions are recorded accurately, I suggest reaching out to your financial advisor so they can guide you on the correct accounts to use.
You can offset the accounts by creating a journal entry. Here's an article as your guide: Create journal entries.