I mean, she's waving goodbye to the apparition of the friend. If the friend was on the train and she was just seeing her off, then we would have been shown the friend in the train or had some hint that she was on it. It seems pretty clear to me that she's waving goodbye to her past and moving on via train.
My question is whether this is a sad but hopeful ending, where she is leaving to meet her future, or a horrible ending, where a teenage girl commits suicide over a failed love.
Yes, she is certainly waving good-bye to both her past and her friend's apparition. However, the fact that the crowd visible on p 26 has clearly disappeared by p 28 indicates that those people have just boarded the train (i.e. the train is not moving). Re never boarded the train.
I maintain that Re arrived at the train station with the hopes of a chance meeting with Fuyu. Re just happened to see Fuyu's apparition instead. Trains are a common form of transportation in Japan and for two friends to frequently meet at a given train station is perfectly normal.
Thus, I see no reason to believe an implied suicide.