Whether it's ethical is, I think, an entirely different question from what you posed in the title.
To answer the question of if the deceased have rights, I would say no. Rights are a means for rational actors to resolve conflict, using reason rather than violence. You cannot come into conflict with the dead, as they are incapable of action. They have no rights; the concept does not even make sense in this context.
EDIT:
From Ayn Rand, The Virtue of Selfishness:
"A “right” is a moral principle defining and sanctioning a man’s
freedom of action in a social context. There is only one fundamental
right (all the others are its consequences or corollaries): a man’s
right to his own life. Life is a process of self-sustaining and
self-generated action; the right to life means the right to engage in
self-sustaining and self-generated action—which means: the freedom to
take all the actions required by the nature of a rational being for
the support, the furtherance, the fulfillment and the enjoyment of his
own life. (Such is the meaning of the right to life, liberty and the
pursuit of happiness.)
The concept of a “right” pertains only to action—specifically, to
freedom of action. It means freedom from physical compulsion, coercion
or interference by other men.
Thus, for every individual, a right is the moral sanction of a
positive—of his freedom to act on his own judgment, for his own goals,
by his own voluntary, uncoerced choice. As to his neighbors, his
rights impose no obligations on them except of a negative kind: to
abstain from violating his rights.
The right to life is the source of all rights—and the right to
property is their only implementation."
From Hans-Hermann Hoppe, The Problem of Social Order:
"Alone on his island, Robinson Crusoe can do whatever he pleases. For
him, the question concerning rules of orderly human conduct — social
cooperation — simply does not arise. This question can only arise once
a second person, Friday, arrives on the island. Yet even then, the
question remains largely irrelevant so long as no scarcity exists.
Suppose the island is the Garden of Eden. All external goods are
available in superabundance. They are "free goods," just as the air
that we breathe is normally a "free" good. Whatever Crusoe does with
these goods, his actions have no repercussions — neither with respect
to his own future supply of such goods nor regarding the present or
future supply of the same goods for Friday (and vice versa). Hence, it
is impossible that a conflict concerning the use of such goods could
arise between Crusoe and Friday. A conflict is possible only if goods
are scarce; and only then is there a need to formulate rules that make
orderly, conflict-free social cooperation possible.
In the Garden of Eden only two scarce goods exist: a person's physical
body and its standing room. Crusoe and Friday each have only one body
and can stand only at one place at a time. Hence, even in the Garden
of Eden conflicts between Crusoe and Friday can arise: Crusoe and
Friday cannot occupy the same standing room simultaneously without
coming into physical conflict with each other. Accordingly, even in
the Garden of Eden rules of orderly social conduct must exist — rules
regarding the proper location and movement of human bodies. Outside
the Garden of Eden, in the realm of all-around scarcity, there must be
rules that regulate the use not only of personal bodies, but of
everything scarce, such that all possible conflicts can be ruled out.
This is the problem of social order."