All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
The two ahaadeeth that you mentioned do not indicate two different meanings; rather, their meaning is the same, which is that death is comfort for the believer from this worldly life and its unhappiness, and this is what is indicated by the hadeeth that was reported by Al-Bukhari and Muslim and that was narrated by Abu Qataadah ibn Rub’i Al-Ansaari, may Allah be pleased with him, who said that a funeral procession passed by the Prophet who said, “Relieved or relieved of?” The people asked, “O Prophet of Allah! What is relieved and relieved of?” He said, “A believer is relieved (by death) from the troubles and hardships of this world and leaves for the mercy of Allah, while a wicked person is relieved of when he dies as his death relieves the people, the land, the trees, (and) the animals.”
What is mentioned here is in general, but as regards a specific Muslim, then Ahlus-Sunnah do not authoritatively assert for a Muslim that he will enter Paradise or Hellfire unless Allah or his Prophet stated that he will, because it is only Allah Who really knows about that person, but they [Ahlus-Sunnah] wish bliss for the believer and fear punishment for the sinful. At-Tahaawi, may Allah be pleased with him, said in his book entitled Aqeedah, “We hope that Allah will forgive the good doers among the believers and admit them to Paradise by His mercy, but we are not certain of this, and we do not testify that they will definitely enter Paradise; and we seek forgiveness for the sinful believers, and we fear punishment for them, but we do not make them despair of the mercy of Allah.”
Hence, saving “Rest in peace” for a believer after his death, then if this is meant as a definite assertion, then this is not permissible, but if it is said as a supplication and hope, then there is nothing wrong with that, Allah willing.
Allah knows best.