I just got charged a substantial fee for renewing some domains that are years old, (old enough that my card on file had expired, so I don't know how they even managed to charge it) that I had completely forgotten about until the charge appeared on my card. I called them up, and they explained that domain renewals are non-refundable and it's my own fault for not telling them I didn't want the domains renewed. Can they do that? I was thinking about calling the credit card company and asking for a chargeback, but I'm concerned that might put me in the wrong...
That will depend on what the company bases their claim on.
Read the contract for the domains, and/or the general terms and conditions of the company.
My guess is that your contract with the company (for the domain) says that the contract renews every year (or so) until you cancel it - that is standard for many types of service contracts. In that case, the company is indeed entitled to payment for their services.
If there is no such language in the contract, things become more complicated. In that case, ask the company (in writing) on what contractual basis they are charging you.
Note: Even if your contract contains a renewal clause, it may in some cases be invalid (for example, if the clause is unexpected, and/or well hidden). However, the rules for this are quite complex and highly jurisdiction-dependent, so to explore that further, you'd need to add the exact language of your contract, and your jurisdiction.