This is most likely incorrect. There are a couple of reasons
Praying in the direction of Masjid-al-Haram is mentioned in the holy Quran, Bakara 144, as mentioned by brother Ahmad Han in his answer
Indeed We see the turning of your face to heaven, so We shall surely
turn you to a qiblah which you shall like; turn then your face towards
the Sacred Mosque, and wherever you are, turn your face towards it,
and those who have been given the Book most surely know that it is the
truth from their Lord; and Allah is not at all heedless of what they
do. - shakir (quran 2:144)
The sacred mosque here means Masjid-al-Haram, the current Kaaba.
In order for something to overrule the verdict of the Quran, it must be more powerful than the Quran. There is not such source that is more powerful than the Quran. Nothing can overrule the Quran. If it mentioned in the Quran, you must obey it.
Citing the above two points, it is not possible to face Al-Aqsa Mosque for prayer. That would be equivalent to disobeying Allah commands.
Can I pray in any direction inside in Masjid-al-Haram
There is no indication that Muslims are allowed to pray in any direction in Masjid-al-haram. If it happened so, it must have happened in the life of the prophet Muhammad (PBUH) but it probably never happened.
It is logical that when you are in Masjid-al-Haram, you fact the center kaaba. There is no confusion about it. If you do not face the kaaba, or face the opposite direction, wouldn't that be insulting the kaaba right in its own? Turning your back towards kaaba is not something that is considered good among many scholars.
Islam strictly believe in discipline. When Muslims pray they are repeatedly asked to make a proper line. This line would not be possible if one person is face one side and the other in another direction.
Facing different direction is against message of unity in Islam. Islam by instinct will not allow it. There is no such freedom in Islam
Can I pray in any direction inside in Masjid-al-Aqsa
Masjid-al-Aqsa was never mentioned by Quran by name. It has been referenced as the farthest mosque [as most scholars agree] in verse 17:1. That was related to the prophet's ascension to the heavens. Although the Quran does establish that there was another Qibla used for prayer:
And We did not make the qiblah which you used to face except that We
might make evident who would follow the Messenger from who would turn
back on his heels - Sahih International (Al-bakara 2:143)
It does not specifically say what really was this Qibla. Almost all scholars unanimously believe it was Al-Aqsa Mosque.
There is a little bit of problem though, Al-Aqsa Mosque was not built at the time. It was built later after the death of the prophet by Hazrat Umar. It was then rebuilt a couple of times by Muslim rulers. The Dome of the Rock also did not exist at the time and was built later by Muslim ruler Abd al-Malik ibn Marwan.
As such, although given high regards by Muslims, Al-Aqsa Mosque's existence as a proper mosque or temple is in question itself.
It would be safe to say, no one is allowed to face in any direction in Al-Aqsa mosque. They must fact the Kaabba and abide by Allah's command. And it just dawned on me when writing this answer, I believe Al-Aqsa mosque does point towards Mecca which is proof that it was built later.
Bottom line
This is just a myth among many others that probably exist out there.