The cigarette Lighter was invented in 1816 by German Chemist JW Dobereiner and the match was invented in 1805 by K. Chancel.

The match was invented in 1826 by English Chemist John Walker. This made it possible to ignite the match by rubbing it against a rough surface. Earlier matches would have required a external spark or flame to ignite. The lighter was invented before the "friction match."

Though, the "light-bringing slave" otherwise known as the "fire inch-stick" was invented by court ladies of northern Qi in China in 577 AD. It was small sticks of Pine wood impregnated with sulfur and then required a user to get their flint rocks and strike a spark on to the Pine wood stick to ignite it. Some say that makes it a match, others say no. It was definitely a prequel to the match though.

Yes it is true that lighter were invented before matches, the modern match box was created by British Chemist John Walker in the year 1827, where as the cigarette lighter was created eleven years prior in the year 1816 by German chemist J.W. Dobereiner.