Targeting the first entry item
The conditional {% if craft.entries.section('projectEntries').order('postDate desc').one() %} basically just tests if the craft.entries.section query returns an entry or not. Obviously, that would evaluate to true on every entry template.

Instead, you probably want to test if the first entry returned by the above query is the same as the current entry. A good way to do that, is to compare the entry IDs:

{% set firstEntry = craft.entries.section('projectEntries').order('postDate desc').one() %}

{% if entry.id == firstEntry.id %}
    ...


To test for the last entry, you could do something like this (notice that the only difference from the above query is that the sort order is reversed):

{% set lastEntry = craft.entries.section('projectEntries').order('postDate asc').one() %}

{% if entry.id == lastEntry.id %}
    ...


If, however, you have access to the entry_prev and entry_next variables within the Twig block that renders the buttons, you can avoid extra database queries altogether by simply checking if those variables are null or not:

{% if not entry_prev %}
    {# No previous entry; the current entry must be the first #}
    ...
{% elseif not entry_next %}
    {# No next entry; the current entry must be the last #}
    ...
{% else %}
    {# The current entry is neither the first nor last #}
    ...
{% endif %}


If you can't use the entry_prev and entry_next variables, a more optimized way to do it than pulling the first and last entries would be to do something like the below – note the use of ids() instead of all(); this is an optimization due to it being cheaper to just pull the entry IDs instead of the full entry models:

{% set allEntryIds = craft.entries.section('projectEntries').order('postDate desc').ids() %}

{% set firstEntryId = allEntryIds|first %}
{% set lastEntryId = allEntryIds|last %}

{% if entry.id == firstEntryId %}
    {# The current entry is the first one #}
    ...
{% elseif entry.id == lastEntryId %}
    {# The current entry is the last one #}
    ...
{% else %}
    {# The current entry is neither the first nor the last #}
    ...
{% endif %}