I'd like to know if it is allowed to have someone keep me company (not to pace, I plan on being near the back of the pack) for a few miles.

Pacers, buddies, company of any kind are strictly prohibited on the course for safety and liability reasons. Runners who want frequent company should plan to have a support vehicle whose occupants they can see AT AID STATIONS/TRANSITION ZONES ONLY. This applies to relay runners as well.