The station used to be powered by nickel-hydrogen (Ni-H$_2$) but with the onset of a new generation of more efficient lithium batteries, it began swapping out its older counterpart ever since 2017, by means of several spacewalks.
The reasons are obvious:
(from The Verge, 2018, emphasis mine)
The advantages of lithium-ion are especially juicy for NASA because these kinds of batteries blow their predecessors away in terms of power: a commercially made lithium-ion battery cell is about three times as powerful as a nickel-metal hydride cell. Lithium-ion batteries also pack a lot of power into a relatively small and lightweight cell... Lithium-ion batteries also last longer than other spaceflight batteries.... The lithium-ion batteries currently powering the life support systems on NASA’s space suits are 11 years old and have barely degraded.
At that time the engineers weren't worried about exploding or burning batteries, but have laid down strict packaging and operational guidelines to ensure that even in an unlikely event of a fire, minimal damage occurs to the spacecraft module and/or its inhabitants. Page 10 of the guidelines explicitly mentions the risks of fire or thermal runaways.
...Five crucial guidelines$^1$ for how to package a battery that’s going on a human spaceflight mission: First, engineers have to assume that a cell will explode in an unpredictable way. Usually lithium-ion cells are designed so that if they do catch fire, they’ll spew their contents through a designated vent of some kind. ...consider the possibility that a cell blows through its casing instead. To prevent that, engineers put steel tubes around the cells to contain them if they burst apart in a weird way.
...enough separation between the cells inside a battery, so that if one goes up in flames, it’s not in direct contact with the other cells.... Materials need to be added between the cells to act as a heat sink, stopping high temperatures from moving beyond an exploding cell.
NASA must include fusible links between these cells [when] in parallel.
The last two rules are all about taking care of the smoke and flames coming from an exploding cell.... And finally, you need something to douse the flames coming out of that chimney.
So yes, in short, they are not only allowed but also widely used, with special emphasis on safety.
1: NASA is prepared if a battery ever explodes in space