Lawmakers have barred cities from decriminalizing possession of small amounts of marijuana, which Nashville and Memphis had moved to do.