Yes, elves can complete a long rest in 4 hours.
Recent ErrataErrata has shedsshed further light on the issue.
The PHB errata Update from 08/31/2017 updated the description of a long rest:
Long Rest (p. 186).Long Rest (p. 186). The first sentence of the rule now reads, “A “A long rest is a period of extended downtime, at least 8 hours long, during which a character sleeps for at least 6 hours and performs no more than 2 hours of light activity, such as reading, talking, eating, or standing watch.”
In addition, you regain at least one Hit Die when you you finish a long rest rest.
Additionally, while not Errataerrata, the Sage Advice Compendium has updated its guidance on the Trance trait to account for the new wording of the Long Rest rules wording.:
Does the Trance trait allow an elf to finish a long rest in 4 hours? If an elf meditates during a long rest (as described in the Trance trait), the elf finishes the rest after only 4 hours. A meditating elf otherwise follows all the rules for a long rest; only the duration is changed. [This answer has been altered as a result of a tweak to the rules for a long rest, which appears in newer printings of the Player’s HandbookPlayer’s Handbook.]
Elves Can complete a long rest in 4 hours, warforged need 8 hours, but less sleep
If you follow this advice from the game designer than I would have Elves be able toofficial ruling, then elves can complete a long rest in 4 hours if they spend it in a trance, with all the other normal rules for long rest applying (except sleeping 6 hours).
Warforged still needneeding to rest for the full 8 hour period, but they can sleep for only 4 hours in their sleep-mode vs 6 hours races other than elves require).