Mineral blocks are mostly for beak health. By that I mean a bird will scrape the beak to keep it free of messes after eating. I would not count on them to replace a good diet for calcium and other minerals. So to answer your question, yes they are ok to put insdie the cage.
Mineral blocks fulfil a similar function to cuttlefish bone, supplying extra essentials for your budgie’s physical well-being. Leave the block clipped to the side off the cage at all times, even if your bird isn’t showing much interest it. He will nibble it when he needs it, and you won’t have to worry about mineral deficiency.
All pet stores with a bird section will stock mineral blocks complete with clips to attach them to the cage. Check the ingredients before buying, though, and avoid any product that contains manmade substances (charcoal is fine) or artificial coloring or flavorings.
Be careful of the clip that attaches to the cage. If it is metal I would find another way to attach it. Some of these clips have tested positive for zinc which is toxic to birds.