Greetings jsado and this is a great question that arrises a bunch of topics.
It would be well worth the time to research and learn form this incident. I have found it necessary to evaluate every buddy I dive with and strategically place myself where I can be of the most assistance if needed. This means at times I am in reach of their inflator at all times, or have contact via. D ring, pocket,etc. This is usually only for the first few warm up dives. It is also very important to keep dive plans very simple, shallow, and not task loading. Some times being a good buddy starts before you get into the water. Proper weighting , weight checks, fin pivots, just taking the time at the beginning of the dive to gain neutral buoyancy can make a dive much more enjoyable.
Not everyone I dive with has issues but we need to be prepared to handle what comes up it goes with the territory.
I have went after divers ascending and descending and have found one must be very careful to protect your welfare. Keep them close so you can put your hands on them to offer assistance. In the event you described it sounded as though all was well once you got to the surface. It is always important to make very sure once a uncontrolled ascent has occurred that you access the diver to ensure a lung expansion injury has taken place.
A Rescue coarse would cover these circumstances and much more. It would be well worth the time and effort to take the coarse, it makes you a better buddy, a better diver in general. I learned a tremendous amount and gained more practical skills than I thought possible!
I hope this advice helps and I hope your buddy is well.
In the event of a real rescue situation which is covered in the class you as the rescuer have to ensure your safety to provide aid. No exceptions! If you both are injured, one rescue turned into two. Take the class you will not be sorry.
CamG Keep diving....keep training....keep learning!