Not sure whether this will work in wrath classic but worth a try.
https://warcraft.wiki.gg/wiki/API_GetLootRollItemLink
This function takes the same input but one of the outputs is the item id.
Which you can then use with
https://warcraft.wiki.gg/wiki/API_GetItemInfo
Which returns the itemLevel which can then use to filter out as you need.