The student is partly right. Biomass does decrease along a food chain: only part of the substances eaten by an animal is digested, absorbed and built into its body. The rest is egested as undigested food, excreted (for example nitrogen in urea) or broken down in respiration to carbon dioxide and water.
However, these substances are not lost from the ecosystem. Faeces, urine and the dead bodies of organisms from every trophic level are broken down by decomposers, which release the substances back into the soil and the air — for example, carbon dioxide is released when decomposers respire, and mineral ions are returned to the soil. Producers absorb carbon dioxide in photosynthesis and take up mineral ions through their roots, so the same substances are used again: substances cycle.
Energy is different. It enters as light, passes along the chain as chemical energy, and at every level some of it is transferred to the surroundings as heat. Producers cannot use heat to make food, so energy cannot be recycled; it flows through the ecosystem in one direction and has to be replaced by light from the Sun. So the statement is wrong to treat substances like energy: substances are passed on or recycled, while energy flows through and is lost as heat.