It is possible to say couldn īt and wasn īt able to in this sentence.
But when you speak about positive sentences, there is some difference.
To speak that smb has the ability to do something in general, we use "could".
For example: I could run ten miles a day when I was 20 years old.
But to refer to a particular past situation you should use "was/were able to"
For example: Although the restaurant was crowded, we were able to find a table.
You also should not mistake "could" for expressing unreal actions (1) and "could" (2) for ability to do something in the past.
1) - My daughter has recently left her job.
- That īs not a problem. She could work at any other big company. (she could work, but in fact she does not)
2) I could read when I was a small child. (= i had the ability to read)
Also "could" is often used in combination with the perfect infinitive and in this case the meaning changes.
it means that the action was not carried out in the past.
For example:
She could have explained everything. (but she did not)
You could have seen the house from here if it had not been so dark!
I hope that will help you at least a little bit.