Should I cancel an interview if I already have a preferable offer?
I am answering based on a subtle but important point in your question. If I am misinterpreting, please let me know and I'll edit or remove my answer. You said:


  I finally got an offer (let's call it A) that I am happy with


but you also said, 


  For example, if the details of the offer from A aren't good (still waiting for those)


To me, it sounds like you don't yet actually have an actual offer in the sense of a binding, written document - maybe it was a verbal offer? At any rate, you're admitting you don't yet have enough details to make a decision about offer A.

If that is true, I would absolutely continue pursuing option B, until such a time as you get the details (preferably written) from A that allow you to decide.

I do agree with the other answers that it would be more rude to waste their time in an interview if you already have an offer you like (versus being rude by declining the interview) but I think it is critically important to be clear with yourself about whether or not you do actually have an actual offer from A or just a verbal discussion that's gotten you excited about a potential offer you may or may not get in the near future. You have a responsibility to B to decline their interview and let them know you have another offer you're taking but you also have a responsibility to yourself to make sure you do have an official offer with terms you can agree to from A. It would be a huge shame to cancel your interview with B only to discover A retracted their offer, changed the details, or gave you additional info you were unhappy with.