"will deleting an invoice from last year mess up the 2018 accounting books for my customer and/or for myself?"
Yes, that will make a Mess of things. You have a Dated Sale, and even Worse, because that is Paid, deleting it changes Everything. That includes if you are subject to sales taxes. Never Do This.
Please Learn from this input.
This is a Mistake: "Ideally, transactions that were entered in error should be deleted to avoid any discrepancies. By doing this, the payment applied to the duplicate invoice will be recognized by QuickBooks as a credit for your customer,"
You only do that if you just made the entry and Just now also discovered it was wrong. This one is Paid; that means it shows on Cash and on Accrual Basis. Deleting it changes Everything and that is historic = in 2018.
You can Reverse a mistaken sale by Offsetting it with a Credit Memo dated Now. Typically, you would Apply the credit to the unpaid sale. Right now, you have no Unpaid Sale for this customer. So, make a Credit Dated Now, using an Item that you want to use to either Reverse the original duplicate sale. Or, you can use an Other Charge type item linked to Income, for "return/allowances" the same as you see on your Tax form. Then you can Refund the customer from the top of the credit memo.