Recently I tried to fix my old ps2 slim that didn't read disks anymore. When I removed the lid I noticed that the problem was that a ribbon cable connector was broken. Can it be repaired? If that's the case how can I reattach the connector and make sure it has a good electric connection?
That's the flex PCB which is broken not the connector. I'm not aware of a method to reliably fix flex PCBs which are breaking so close to the exposed pads where the connector goes.
You could try and scrape of the polyimid layer (the orange plastic) near the end and solder the exposed copper to the gold pads, but if you apply too much solder on the golden pad, it won't fit back into the connector. Afterwards to give back some of the stability of the polyimid layer, you can try and wrap it with some adhesive film. But the copper is likely to break off again.
For popular devices like the PS2, replacement parts for common failures are available. A quick google search for "PS2 slim drive flex" returned results which got at least my hopes up, that there is something for you available.
Lastly, you can copy the design and get it made by one of the PCB manufacturers. Prototype quantities of these things might be quite expensive - so you could try to order many and sell the rest or buying a "new" used PS2 slim could be cheaper (but might break with the same failure).