Can the second "has" be dropped in the following?
John has drunk a cup of water, and Peter has eaten a piece of cake.
No. If you remove the second "has", the sentence no longer makes sense:
John has drunk a cup of water, and Peter eaten a piece of cake.
What you can do, however, is remove both the "has [past participle]".
John has drunk a cup of water, and Peter a piece of cake.
Uh, oh! That leaves us with a new problem: one cannot drink a piece of cake. By removing the verb and past participle, it now reads that: John drank water, and Peter drank cake. Whoops. To fix this, we will have to change the verb or remove it entirely. An ideal sentence would be something like:
John has eaten an apple, and Peter a piece of cake.
This is the same as writing:
John has eaten an apple, and Peter has eaten a piece of cake.
This is ideal because both John and Peter ate something: an apple, and a piece of cake, respectively.
Now, to fit your original sentence, the verb “consume” properly conveys both drinking and eating. It’s not perfect, though. Despite working grammatically, it just doesn't sound like something a native English speaker would say.
John has consumed a cup of water, and Peter a piece of cake.
In the end, native speakers would write:
John has had a cup of water, and Peter a piece of cake.
Delicious!