Possible to screw machine screw in wall?
Two ideas come to mind. 
First You could check your local hardware store for a concrete type anchor that has an internal threaded, You may get lucky and find it has the thread size you need.

Secondly you could drill a hole ~ twice the diameter (or so) of the thread with a masonry drill bit into the brick. Fill the hole with epoxy and place the magnet thread in the hole. A piece of "Duct" tape could hold the magnet in place until the epoxy cures. If you ever need to remove the magnet, it should be able to unscrew from the epoxy "nut".