can vs. be able to

Hi, everyone. I have another question for you.
What is the difference between ‘can’ and ‘be able to’?
Do they have different meaning?

The same meaning when they refer to ability.

I was taught that ‘be able to’ is slightly formal than ‘can’. Gramatically I was instructed that ‘can’ does not have its PP form used in present perfect tense while ‘be able to’ has its PP form as ‘been able to’ to express the idea.

Am I right Mr. M?

I don’t agree with any difference in formality. Since ‘can’ has no future form, perfect form, or common past form, ‘be able to’ substitutes for ‘can’ in all these verb forms:

I can dance.
I could (?) / was able to dance.
I will be able to dance.
I have been able to dance.