I heard from a person that in Makkah and Madinah, the rule on not praying Salah during forbidden times does not apply in these two places, meaning he said that Salah can be performed even during forbidden times in these two places, is that correct?

Ustadh AbdulAziz al-Haqqan
No. Imam Ibn Baz said that in al-Masjid al-Haram no voluntary prayer is prayed after Asr or Fajr except the two rak'ahs of tawaf, by the hadith "Do not prevent anyone who circles this House and prays at any hour he wishes, of night or day" (reported by al-Tirmidhi; graded sahih by al-Albani raḥimahullāh). Prayers with a cause, like tahiyyat al-masjid, are allowed in any place.