The first sentence implies something that could have happened in the past but it never did, in the second example however, despite could might be used to describe something which happened as well in the past, in this particular case I am pretty sure natives would understand something that might happen or not rather than something tha happened that is to say using "could" as the simple past form of can. Am I right?
You could've been a leader
You are right that this "sentence implies something that could have happened in the past but it never did."
You could be a leader
You say this "might be used to describe something which happened. . . in the past" and are wondering if people understand this as saying that something may or may not happen, rather than something that happened, and you wonder if this is using it as a past form of "can."
I am not sure you have the correct idea of this second form. The first is what most people would interpret it to mean without context.
You could be a leader = it is right now possible for you to be a leader. This is a version of 2. in which the implied "if" is something like "if you want/choose to" be a leader.
You could be a leader = implied you could right now be a leader "if" some other thing is true. "Come on, Sally! Do it! You could be a leader!" (There is an implied "You could be a leader [if you do it]" in this context.) Saying "you could" implies right now, you could do something. It doesn't mean something was happening in the past. We know this because "be" doesn't refer to the past.
However, it is possible to use "could be" to refer to the past in specific scenarios. I would not recommend trying this unless you are confident.
Obviously correct: yesterday, he could have been at the grocery store. Also correct: yesterday, he could be at the grocery store. The first is saying that it is possible that he was at the grocery store. The second is also saying that that is is possible he was at the grocery store, but implies this is because some ongoing state. For example, if the person had died today, he could be at the grocery store yesterday shopping, but now he's dead. That is, he had the ability / the possibility to be at the grocery store yesterday.
Tl;dr: Assume "could be" refers to something presently possible about an action you could do in the future.
For three of the modals in English (will, can, and shall), the historical past forms are indistinguishable from the potential forms, except by adding another auxiliary (be = not perfect; have been = perfect).
Consider the following:
I will be king. I would be king. I would have been king.
I can be king. I could be king. I could have been king.
I shall be king. I should be king. I should have been king.
The first sentence is adding the modal to the verb. The second is the potential. And the third is the past potential.
A similar phenomenon is going on with am, was, and were, which is why you get the (not dead yet!) subjunctive form of to be in the example: "If I were king." Were here looks like it's the past tense, but it's actually the potential (or subjunctive) form, which is identical to the past tense, except that it looks plural, not singular. For could, however, there is only one form, identical in the singular and plural.
Final note: could can still be a past tense form of "can", such as in the example given in this question. It's therefore not "safe" to assume it's always potential.