That rubbery foam thing is the surround. It is an essential part of the woofer. Severe damage can require a recone. Normally a small pinhole from a screw is easy to repair to save the sub.
The at-home fix: Using black silicone, squeeze a little bit onto a piece of cardboard. Dab your finger in it and spread an even amount on the top side making sure there are no high spots. Repeat on the underside. Once it dries completely, you should be good to go.