The answers below will be helpful for allowing Ferrothorn itself cover the weakness, but in a competitive scenario at least, I personally find the best option is to simply switch out. Ferrothorn shouldn't stay in against Pokemon with Fire-type moves at all, even if it is equipped to take them on. They will still likely beat Ferrothorn 1v1; its weakness is huge even with an Occa Berry, and Ferrothorn doesn't have the powerful attacks required to make it worth taking the hit. (Its best option to hit Fire Pokemon for super effective damage has only 60 base power!)