What is this device protruding from the rear of this 787?
As you have already imagined, it's the APU fuel line shroud drain, as visible here:


(Source)

Detail:

  

The fin gives an aerodynamic profile to the drain. The reason this drain exists seems to be:


  Natural fuel leaks from the auxiliary power unit (APU) fueling line
  were supposed to drain harmlessly out the bottom of the structure as
  designed, though rather than do that, the fuel was pooling into the
  APU exhaust cone.


(Source)