Evidently it is both first you have the outer layer as in photo in link below, when it it peeled away is the brown outer shell and the edible insides are know as the "meat or the "fruit". I would ask your friends if the allergy includes the coconuts better to ask than to have them go to the hospital or even worse.
I had to look this up I didn't know either.
Many botanists would say that it’s both a nut and a fruit.
Nuts are a type of fruit. So are berries, and even grains. A fruit is the part of the plant that carries the seeds, so a fruit can range in shape from a watermelon to a tomato to an acorn.
Fruits are divided into about 14 different categories, and nuts are one of those categories. What makes a nut a nut is basically its dry, hard shell – and the fact that it usually contains only one seed. A coconut is the largest known seed in the world.
http://www.earthsky.org/faq/is-a-coconut-a-nut-or-a-fruit
The outer layer of a coconut is known as the mesocarp. Coconuts in the store are usually stripped of their mesocarps, but if you have a chance to see a coconut in nature, you will see the thick fibers which cover the fruit. These fibers are known as coir, and they are used in rope making and textiles in some regions of the tropics. Coir fiber is very strong and durable, although it can also be a bit itchy.
The next layer of the coconut is the endocarp, which is the hard hull of the fruit which most people see when they buy whole coconuts at market. The endocarp protects the tender fleshy endosperm, the meat of the coconut. You may also note that a coconut has several soft depressions, which are designed to allow the embryo to grow if a coconut is fertilized and allowed to mature.
http://www.wisegeek.com/is-a-coconut-a-fruit-or-a-nut.htm