On Facebook I very frequently see activities in my feed where my friend likes or comments on another person's post but that person isn't my friend. Can I hide such posts from my news feed?
You are just seeing your friend activity, whatever they do, you see that in your feed. Because you are following your friend. Just stop following your friend, you will not see his/her activity on your feed but you still be friend.
Go to friend's timeline, click on "Following" tab, you will see "Unfollow frinedName", click on that. Now you both are friends but you have stopped following your friend, so you will not see his/her activity on your feed.