When Aladdin is captured and thrown in the castle dungeon with his wrists locked to the wall, Abu manages to break Aladdin out of his chains by using a bobby pin to pick the lock.
Although it's hard to place the exact time period in which the movie takes place, it's safe to assume that it was sometime before the 1920s, when bobby pins were invented by Luis Marcus in San Francisco.
Other hairpins were around earlier than that, but the item Abu is holding is clearly a bobby pin because it has one straight and one ridged prong.