Much in the same way that they allow for the VAT to be charged at the border, a tariff to reflect the cost of carbon regulations would be legal:
Countries implementing cap-and-trade systems for greenhouse gases may be able to use border taxes to protect domestic industries, after the World Trade Organisation gave a cautious nod to such measures.
It’s basic common sense, though they do note that it cannot be, “a means of arbitrary or unjustifiable discrimination or a disguised restriction on international trade”.