It's actually dignity, not purity.
Dignity you can gain by fighting and winning, though it's a bitch to grind it since the amounts are measly, i suggest you just edit your savefile (be sure to make a backup before doing edits).
Windows button + R, type %appdata%, click ok, go to roaming, open up "TalesOfAndrogyny" folder, open up whichever your save is in any text editor, ctrl+f "dignity" and do you should find something like this (i just use notepad).
View attachment 1639214
Then you need to completely remove that amount of dignity (and purity if you want) and make it look something like this (there might also be another line of text that is the current rank which your dignity/purity is at, just edit those out as well if you want max dig/puri).
View attachment 1639216
Save the file, go back into the game and load the save file (do not press continue, it won't actually load up the edited savefile, it just continues where you left the game last time).
Town of monsters sells scrolls of teleport if i remember correctly, witch should also sell those, but like Twiton already said, Alma the warlock can teach you how to make portals if you have her as your companion, it's kinda lengthy to farm out that since you need to get 100 affection with her.