China ordered firms not to comply with US sanctions on five oil refiners, highlighting risks for companies caught between US and Chinese rules.