So I want to find a game made by this dev unfortunately I don't remember the name of the game but in it you play a ghost and you become either a demon or an angel by going through a mansion with various puzzles to complete
Yup, it does sounds like Dusty's Castle alright. I think you can still find it on Newground for example, but I don't know if you have to have flash installed somehow to play it, cause it was a flash game.