Those look simple, but there are many things to trip up learners in there.
-지만 is a conjugation form for verbs and adjectives, but it can come after a noun too.
The reason is because it can a contraction of -이지만, which comes directly after a noun.
* 실례이다 = 실례(n) + 이다(is) = It is 실례 (impropriety). 이다 is a special particle acting like a linking verb. (It is the only verb-like particle, and attaches to a noun without a space, as in 나는 학생이다).
* 실레이지만 (실례이다 + -지만) => 실례지만 (이 drops only after a vowel-ending syllable).
So 실례지만 is like "(I know) it is improper, but ...".
We do not say 실례하지만 very much. The other commonly heard phrases are: 실례되(겠)지만, 실례합니다만, or 실례합니다 / 실례하겠어요 / 실례해요 (when you're trying to get someone's attention or passing someone in close quarters). These sound more polite and refined than 실례하지만.