Thank you for the many very kind responses. I was so afraid that people would find some reason to make me feel like an idiot for even thinking about this.
I did attend the funeral and, after the burial service, had just a moment to speak with Sam. Sam is only 24 years old, and it is a small town. I had already been greeted by name by several other attendees, even some whom I did not recognize myself. Such is the life of a small-town band director. I was not concerned that Sam would not know who I was. The only Facebook stalking I did was to find a picture. I am pleased to say that he looks better now than he did in the profile picture.
When I did visit with Sam, I firmly shook his hand, embraced him, and offered my sincerest condolences. As was suggested up thread, I said the same things I would have said to Sally. It is, after all, the same person. I mentioned that I had talked to his mom a few months ago and she had told me of some of the things going on in their lives (such as dad being sick, etc.) I also invited him to call or come by the Band Hall some time. I mentioned that we have a lot of good memories there. He agreed that we did, and then we had to break up as he had other responsibilities to attend.
As an aside, the funeral service (at the church) had a glaring (to me) omission. Several people, including two ministers, recounted sometimes humorous stories about the deceased. Each of the close relatives (brothers and sisters, parents (mom and stepfather are still alive), wife) were mentioned. There were no stories of adventures with Sally as she was growing up, etc. I never witnessed anyone being rude or disrespectful toward Sam, and he sat on the front pew next to his mom, but he seemed curiously absent from the comments made by the speakers. The church was an Evangelical Lutheran Church, which, as I understand it, has taken a very progressive approach to LGBT issues. I don’t believe that the church itself would have any opposition to Sam, though some individual parishioners may.
The other thing that struck me was a lack of Sam’s classmates. The only other person I recognized from school was there with her parents (remember: small town; everyone knows everybody). When I looked in on Facebook, Sam and I had about five Friends in Common. I have many former students on Facebook, so I typically have many Friends in Common among local FB Friends. In Sam’s case, there are a few, though that can be explained by many of his classmates not recognizing his new name.
Finally, the obituary listed Sam as the deceased only child. This was in the printed obit handed out at the church, the obit on the funeral home website, and as it was read by the minister. No mention of Sally was made at all.
Oh, and for purplehorseshoe, I didn’t mean that I go to funerals every weekend. But, if I learn of a funeral involving our band family, I will usually attend if possible. I have been in this town for fifteen years. I have taught nearly one thousand students. After the burial service, I wandered through the cemetery for a bit. I know LOTS of people there, or at least know ABOUT them. When my own son died ten years ago (this month) nearly half the town showed up for the funeral. Seeing their old band director actually is a special thing for some folks. 
Thank you again for the very warm and helpful replies.