If you are invited to dinner by a friend but you already have plans for that evening which you cannot change, you have to refuse it. The polite way to refuse it is to say “thank you”, but neither accept nor reject the invitation.