I wouldn't carry an ice pack either, but I would (and do) carry benedryl. However, if you want to use it as a first aid item the best form is either liquid or strips (both found in the children's medicine section). Benedryl is one of the most benign medications out there, and yet it can help immediately in the case of an allergic reaction. It is also effective in nausea and as a sleep aid.

If you are in a group you can ask at the start of a trip what measures each participant wishes to be taken in the event they are rendered unable to make a decision or provide consent. Each hiker should carry their own personal medicines (including OTC) and let each other know where they are located in their pack in case they are needed. You can assist people with their prescribed medication (i.e. nitro), but you can't "legally" decide to give someone a dose of their medicine. You can retrieve the medication, open the container, put it in their hand, but technically you can't put the medicine in their mouth or administer an epi-pen, insulin dose or inhaler (some examples).

You're also right - you can't "prescribe" OTC medication to someone. I think I might handle it by asking the person if they have any pain meds in their personal kit that they might want to use.

MNX a/k/a Dixie Moon
YMMV. Viewer discretion is advised.