Ali al-Hassi told Reuters that the car had been in a queue at the checkpoint and exploded when it reached the front. The casualties included guards and civilians, he said.
Ras Lanuf and the nearby oil port of Es Sider have come under attack from Daesh militants this week.
Earlier in the day, a car bomb exploded at a military training camp in the Libyan city of Zliten, killing 70. More than 100 people were on hand for a military training exercise.
Daesh claimed responsibility for that attack, al-Hadath television channel reported.
The bombings come on the one-year anniversary of fatal attacks carried out by Daesh-inspired militants in France. Two gunmen killed 17 people at the Paris offices of Charlie Hebdo magazine and at a Jewish supermarket.