You're basically correct. But there's a lot of subtlety with could that often requires more context to resolve.
She can go to school.
This is our base reference. Nothing is unknown. She immediately has both the ability and the opportunity.
She could go to school.
There are up to three conditions not in evidence with the example. She might have the ability and/or might have the opportunity. Further, we don't know when the event is important. Generally, this statement refers to an event or decision now or sometime in the future --- but that's not necessarily the case (just the most likely case). "She could go to school. But she turned eighteen and lost the opportunity." Therefore, this statement can be used in the context of the past tense. Note that the
present perfect tense is preferred when dealing with the past tense, but there are cases when it is inappropriate, such as when the discussed action is not known to be completed. "She could go to school, but was distracted by her family." Thus, the opportunity might not be lost because the distraction could go away in the future.
She could go to school last year.
This is an example of additional context that reduces the number of unknowns by resolving time. She had the ability and/or opportunity, but no longer has one or both.
She could go to school without passing the test.
This also is an example of additional context that reduces the number of unknowns by resolving ability. She had or has the opportunity or the time, but may not have or no longer has both.
She could have gone to school.
This is the
present perfect tense and suggests a past event or decision has a relationship with the present. She might have had the ability and/or might have had the opportunity, but one or both was lost before today and that fact is important.
Perhaps the worst aspect of could is its use in colloquial spoken English where its use is often dependent on what other people have said. Gratefully, the majority of English speakers aren't worried about the small things, allowing the use of could to be very flexible.