Olympics officials in Rio have apologized after discovering they were raising an incorrect Chinese national flag during medal ceremonies.