Yes you can fix it. If the wire was chewed off close to the earbud,that’s good. Length won’t be a huge deal. Just pop the earbud open,and strip the wire. There are 2 tiny wires inside. Those wires are coated with a thin layer of enamel. It looks shiny on the wire,which is why the red wire looks like red copper,but it’s actually red coating. If you use flux and a soldering iron,it will burn the enamel off and tin the copper with solder. Then you can touch each wire to the appropriate solder pad. It’s a pain in the ass since the wires are small. Flux is very important too.