פרשת שלך- Praying to the dead?
וַיַּעֲל֣וּ בַנֶּ֘גֶב֮ וַיָּבֹ֣א עַד־חֶבְרוֹן֒ וְשָׁ֤ם אֲחִימַן֙ שֵׁשַׁ֣י וְתַלְמַ֔י יְלִידֵ֖י הָעֲנָ֑ק וְחֶבְר֗וֹן שֶׁ֤בַע שָׁנִים֙ נִבְנְתָ֔ה לִפְנֵ֖י צֹ֥עַן מִצְרָֽיִם׃
They went up into the Negeb and came to Hebron, where lived Ahiman, Sheshai, and Talmai, the Anakites.—Now Hebron was founded seven years before Zoan of Egypt.—

וַיַּעֲלוּ בַנֶּגֶב וַיָּבֹא עַד חֶבְרוֹן וַיָּבֹאוּ מִבְּעֵי לֵיהּ אָמַר רָבָא מְלַמֵּד שֶׁפֵּירַשׁ כָּלֵב מֵעֲצַת מְרַגְּלִים וְהָלַךְ וְנִשְׁתַּטַּח עַל קִבְרֵי אָבוֹת אָמַר לָהֶן אֲבוֹתַי בִּקְּשׁוּ עָלַי רַחֲמִים שֶׁאֶנָּצֵל מֵעֲצַת מְרַגְּלִים

It is also stated with regard to the spies: “And they went up into the south, and he came to Hebron” (Numbers 13:22). Why is the phrase “and he came” written in the singular form? The verse should have said: And they came. Rava says: This teaches that Caleb separated himself from the counsel of the other spies and went and prostrated himself on the graves of the forefathers in Hebron. He said to them: My forefathers, pray for mercy for me so that I will be saved from the counsel of the spies.

The Gemora explains Kalev went to Daven for his Harzlacha against those who were against him.

אבותי בקשו עלי רחמים - וא"ת והאמר בפרק מי שמתו (ברכות דף יח.) דמיתי לא ידעין מידי ומשמע במסקנא. ואפילו אבות העולם יש לומר דעל ידי תפלה שזה מתפלל מודיעין להן שכך נתפלל והכי אמר בפרק שני דתענית (דף טז.) למה יוצאין לבית הקברות כדי שיבקשו עליהם מתים רחמים וכן בפרקי דחסידים בעובדא דרבי מנא דאשתטח אמערתא דאבוה:

There is a Halacha that one should not go to a gravesite to pray to the dead. The Gemora explains Kalev went to the burial place which was a holy place because the forefathers are buried there.

לָמָּה יוֹצְאִין לְבֵית הַקְּבָרוֹת? פְּלִיגִי בַּהּ רַבִּי לֵוִי בַּר חָמָא וְרַבִּי חֲנִינָא. חַד אָמַר: הֲרֵי אָנוּ חֲשׁוּבִין לְפָנֶיךָ כְּמֵתִים, וְחַד אָמַר: כְּדֵי שֶׁיְּבַקְּשׁוּ עָלֵינוּ מֵתִים רַחֲמִים. מַאי בֵּינַיְיהוּ? אִיכָּא בֵּינַיְיהוּ קִבְרֵי נׇכְרִים.

The Gemara further asks: And why do they go out to the cemetery on a fast day? Again, Rabbi Levi bar Ḥama and Rabbi Ḥanina disagree with regard to this matter. One said this is as though to say: We are like the dead before You. And one said that one goes out to the cemetery in order that the deceased will request mercy on our behalf. The Gemara asks: What is the practical difference between them? The Gemara answers that the practical difference between them concerns graves of gentiles. If the purpose of going to graves is to say that they stand before God like the dead, graves of gentiles would suffice. However, if they go to the cemetery for the deceased to ask for mercy on their behalf, they should visit specifically Jewish graves.

ה' יענה את שלום אהובי ר' אליקום הוי ידוע כי מאוד אני נפלא על בני אדם הנודרים על בית הקברות כי קצת היה דומה לדורש אל המתים דלא מצינו רק גבי כלב שנשתטח על קברי אבות (סוטה ד' לד:) היינו שמתפללים לה' ומקום קדוש גורם שתהא תפלתו נשמעת כדאשכחנן גבי אברהם אל המקום אשר עמד שם מלמד שהמקום גורם א"נ אדם שביזה את המת ולכבודו משתטח על קברו זה מצינו (חגיגה ד' כב:) אך נשים ובני אדם שאינם יודעים זה לא ידעתי הליכתם למה ואני רגיל לכל הבאים אלי לפתוח להם בחרטה ויתירו להם הנדר ויתן לצדקה מה שהיה מוצא על הדרך ואחר כך יתן מה שנשאר כפי מה שהיה טורחו והילוכו זה יתן לצדקה וינצל מצעקה. חיים פלטיאל תולעת:

The Mahram explains that this is the holy place one is davening at and not to the dead themselves

If we look at the language of the Gemora we see: אָמַר לָהֶן אֲבוֹתַי Kalev seems to be talking to the Avos themselves, not to Hashem.

So in conclusion is one allowed to daven to the dead of the place where they are buried is a holy place

מהר"ר חיים פלטיאל על הנודרים לילך לב"ה קצת היה נראה כדורש אל המתים דכלב שנשתטח על קברי אבות התפלל לשם במקום קדושה כדי שתהא תפילתו נשמעת וכדכתיב באברהם אל המקום אשר עמד שם אלמא שהמקום גורם. א"נ מי שביזה את המת ולכבודו משתטח על קברו זה מצינו אך נשים ובני אדם שאינן יודעין זה לא ידעתי הליכתן למה ואני רגיל לפתוח בהן בחרטה ויתירו להם הנדר ויתן לצדקה מה שהיה מוציא על הדרך ואח"כ יתן מה שנשער כפי שהיה טרחו והילוכו וזה יתן לצדקה וינצל מצעקה ע"כ מיהו כבר החזיקו במנהג זה ואין מוחה ויש לזה סמך בספר הזוהר ודוקא להשתטח על קברי אבות ולהתפלל לפניו יתברך על כל צרה שלא תבא בזכות אבותיו הנקברים פה וכיוצא בזה וכבר נתקנו סדר התפלה למשתטחים על קברי אבות ואין לשום מורה למנוע ולבטל מנהג זה. דין נדר שלא לשחוק בקוביא ע"ל ס"ס רי"ו וסי' רכ"ח: