Yep, sure can - it's easy, but not so easy as just pulling the old one off and putting the new one on. You have to check for buffer tube and spring compatibility, etc. But the short answer is "yes".
As stated above, it is an easy process if you have the knowledge and the proper tools. Without one or both of these there are pitfalls that can bite you in the **s.
Very easy, but worth watching someone do it the first time. A few hidden springs to look out for. Here is a review of some collapsible buttstocks, and welcome to the world of AR15. It's very addictive and like Barbie for men. Dress them any way you'd like...
Have to get the complete kit; need to replace everything back of the receiver. The buffer tube runs the length of the A2 and would be too long. It's dead easy with the right wrench.
Also, it might help if you post which brand (if any) of AR. Some companies (like Rock River) seem to use a thread-locking compound to hold their buffer tubes, which may require heating and or extra effort to get loose without damaging the receiver (particularly since I imagine you do not have a receiver block for your vice.)