I wouldn't say that Ramos is a problem in Real Madrid's defense.
He is the most productive CB in La Liga in my opinion.
Apart from that, I agree with you about Nacho and Carvajal. Real needs to sign 2 good center backs at least if they want to be a competitive team again...
Ramos is a legend and a very high scoring Centre Back, any team would love to have him. He is also a very good leader but he has 2 problems
1. Of course the discipline. It's costs Real Madrid sometimes especially the against tough Opponents
2. He moves forward so much(explains why he has a number of goals). This is at times disadvantageous especially if an opponent leads Real Madrid first. Ramos being a highly spirited player will feel desperate for a goal and start moving forward thus leaving gaps at the back.
With Marcelo and Cavajal also always pushing forward. A counter attack from an opponent easily yields into a goal.
During the times, the savior is usually Casemiro because he stay back.
Perhaps getting him better partners would work and also a back up DM for Casemiro.