You couldn't just switch it out. You would need to refund, then invoice. So I would do it in the following manner
Click "Cancel/Refund" on the original item, so that its refunded, they are returned to their original group etc, as normal. When asked, set it to add to credit rather than refund
Create a new invoice under that account with the new item, and save
Click to view the invoice, and select "Charge to account credit"