Sure, you can physically hand your ID or driver's license to your friend. And your friend may hold it in her hands momentarily, while pointing and laughing at the goofy look you're sporting in the picture. That friend can even pass it to another friend, while pointing and laughing and saying, "Look!" All of that is perfectly legal.
It's normally what happens after you give a friend your ID that matters.