Magnetic-field-induced nontrivial electronic state in the Kondo-lattice semimetal CeSb