Lucky bamboo isn't actually bamboo at all; it belongs to the dracaena family and is, in fact, a type of lily. Most lucky bamboo is grown indoors hydroponically (rooted in water). These plants thrive in low-light conditions and require very little care, but if their minimal needs are not being met they may start to show signs of distress including spindly growth, yellowing leaves, or a foul odor that usually comes not from the plant itself but from the water it's rooted in.
Move the lucky bamboo plant to a location that receives less light, or install sheer drapes to help filter the light it's receiving. Too much light might be causing your bamboo's leaves to turn yellow; bamboo usually thrives in low or indirect light, and can actually survive under artificial lights with no exposure to natural light at all.
Empty the water from your bamboo arrangement. You may need to either place your hand over the opening of the vase or pot to keep the pebbles inside from falling out while you do this, or just place a small bowl beneath the vase to catch the pebbles, then put them back into the vase when you're done.
Remove the bamboo from its vase or pot and rinse both plant and container thoroughly with filtered, spring or distilled water. Don't use soap or detergent to clean the container; instead, rub rock salt on it with your fingers then rinse thoroughly. Return the bamboo to its container and refill the container to the previous water level with filtered, spring or distilled water. This should remedy the odor problem.
Pull any yellowing stalks out of the arrangement. Stalks with green stems but yellow leaves are usually fine, but if the stalk itself is yellow it is either dead or dying. These damaged stalks are another possible cause of odor and may spread the problem (usually either bacteria or rot) to other stems if not removed promptly.
Fertilize with a half-strength, balanced liquid fertilizer (a 7-7-7 or 8-8-8 solution is ideal). This might also help remedy yellow leaves, but should only be done if your bamboo hasn't recovered after addressing the possible problem of too much light.