Thanks for visiting the Community.
Yes, you can unapplied a credit if you already applied it to the invoice.
Here's how you can remove a credit memo from an invoice:
1. Go to your transaction, then CTRL + H to display your transaction history.
2. Double-click the invoice and select Apply Credits.
3. On the Previously Applied Credit window, clear the selection code.
4. On the Apply Credits window, click Done.
5. On the invoice, hit Save and close.
Here's an article for more detailed steps and information resolving an issue when accidentally apply a credit to an invoice: Remove or unapply a credit from an invoice or bill.
You may check this resource page for future reference in case you want to learn more of giving a refund to your customers: Give your customer a credit or refund in QuickBooks Desktop for Windows.
Stay in touch if you have other questions or concerns. I'm always here to help. Have a great day!