Looking to identify a particular form of solitaire played in-hand, not on a table
It sounds like you're describing One-Handed Solitaire, or a variant of it. Here's a second description of the rules. It's actually possible to play several solitaire games in this way, where you use the top of the deck as a kind of compressed tableau, and store the discards in the draw deck itself.