Legendary investors like Warren Buffett and Ray Dalio are tweaking their portfolios to battle high inflation. You should follow their lead.