Emphasis mine:
Any creature can cast a spell of 1st through 5th level into the
ring by touching the ring as the spell is cast. The spell has no
effect, other than to be stored in the ring.
It does not say that any spell cast while touching it must be stored into the ring. Interpreting it like that would mean that a caster wearing this ring would be basically unable to use many of their spells.
This would not only require twisting the RAW wording (by using a non standard definition of "can"), but also feels like against RAI in your example: an item that could be used to repeatedly cancel the casting of any spells under 5th level that only requires a reaction to use and that is never expended is by comparison way stronger than everything else in the rare category. Compare that to the legendary Ring of Spell Turning which merely grants advantage on saving throws and counters spells completely only when you get a natural 20. Or compare with Rod of Absorption which is very rare and has a limited number of charges.
Spells cast from the ring use normal actions and no components.
Many magic items allow the user to cast spells. The general rules for this are on p. 141 of the DMG, under the Spells subsection of Activating an Item:
Some magic items allow the user to cast a spell from the item. The spell is cast at the lowest possible spell level, doesn't expend any of the user's spell slots, and requires no components, unless the item's description says otherwise. The spell uses its normal casting time, range, and duration, and the user of the item must concentrate if the spell requires concentration.
(emphases mine).
Beyond these rules for magic items, casting a spell follows the rules in the Player's Handbook; generally, the character casting the spell takes the Cast a Spell action on their turn.
Here's what the Ring of Spell Storing says about casting the spells in it (DMG, p. 192:
While wearing this ring, you can cast any spell stored in it. The spell uses the slot level, spell save DC, spell attack bonus, and spellcasting ability of the original caster, but is otherwise treated as if you cast the spell.
Let's look at two examples of stored spells being cast:
- Fireball stored in the ring at 3rd level by a 10th Level School of Evocation wizard with a save DC of 16
- Magic Circle stored in the ring at 5th level by a 11th level Cleric with a save DC of 17.
Fireball, cast from the ring by a 3rd level Sorcerer (save DC 14):
- Will require one action to cast (same as the spell)
- Will do 8D6 damage; the original casting wizard's Empowered Evocation feature will not apply since it is not one of the characteristics that the ring lists as being 'stored'.
- Can be used with Quickened Spell by the casting sorcerer, since that falls under being "treated as if you cast the spell".
- Will have a save DC of 16, from the original caster.
Magic Circle, cast from the ring by a 19th level Fighter:
- Will require one minute to cast (same as the spell).
- Will not require any chalk or other material components, even though that is normally required.
- Will have a duration of three hours (base duration plus two extra hours for using a 5th level slot).
- The fighter has no spellcasting ability, and thus no spell save DC, but the Magic Circle will have a save DC of 17.
Best Answer
RAW
Rings of spell storing capture a given levels worth of spells. Cantrips are considered level 0, so by RAW they couldn't be stored.
Why not?
If you could, you would be able to store an infinite amout of them in the ring and pass it off to another party member, essentially giving them a free set of off-class cantrips.
A pure fighter with an endless supply of free eldritch blasts, green flame blades or chill touches would be game breaking.
Houserule and the Problems it Might Cause
A DM might rule that for the ring of spell storing purposes the cantrip is a level 1 spell.
Which might still break balance. Because cantrips are "free" attacks (in that they don't spend resources) some of them are designed to be the primary attack of certain classes. A level 2 fighter for instance, who convinced a high level warlock into storing for him, could use Action Surge to fire 4 beams of Eldritch Blast from the ring of storage, then fire 4 more beams of Eldritch Blast. Each blast potentially doing 1d10+(CHA modifer of warlock) damage and pushing the target back 10ft -- if the invocations used at the time the Warlock stored the spells could be released.
Granted, multiclassing could (possibly) allow you to do that, but that has been balanced and play tested and has costs. It would be odd for a level 2 fighter to be in the same party as a level 11 Warlock, so it isn't likely something that would happen alot, just that it could if the the player met an NPC or such willing to store the spell for him.
For prestidigitation, I don't see a problem with a DM letting you use a Ring of Spell Storing counting it as a first level spell.
Could one just create a Ring of Prestidigitation some other way?
Yes. And at a fairly reasonable price you could either craft (if your DM allows crafting) or buy it. That said, if magic is more rare in your world the costs for making or buying it could vary.
Crafting it.
The cost for buying a Common Item is 50 gp to 100 gp , and the cost for buying a Uncommon Item is 101 gp to 500 gp (DMG p 135). Crafting rules state that "you must expend raw materials worth half the total market value." (PH p.187).
It would take 4 full days and about 50 GP if the DM says it is a Common item, or 20 days and about 250 GP if it is an Uncommon item.
The chart in the DMG (p. 129) seems to say that to craft a magical item you have to spend the total cost of the item and the time. Running completely RAW for magic items would put it at 4 full days and about 100 gp for Common item, or 20 days and about 500 gp for Uncommon item. The one issue with this is that there is no benefit to spending the time on crafting over just buying it. I assume the reason that this is the case in the rules is because previous editions allowed wizards to get get very rich selling magical things.
Buying it
If the DM allows you to find a place the sells it, the purchase price should be somewhere between 50 (if it common) or 500 (if it is uncommon).