An different attack occurs to me. They could join a mining pool and would get credit for their hashes. However, they could still throw away the winning block, if they didn't actually win.
I don't see how this attack could work. It is very unlikely that a miner finds a valid block. And for a number guessing game, there are lots of possible numbers. So if you throw away a valid block that didn't win your guessed number, the probability to win the number guessing are only increased by a very very small percentage, multiplied with the prize, lower than the pool reward.
Same would be true if someone has enough computing power to solo solve a block. If the random number seed uses the hash of the block, it will be very random. So the block solver can only throw away blocks that are not resulting in winning the guessing game. If you have lots of computing power, you could probably find one block per day. But throwing that away will only increase the probability to win the number guessing game by a small fraction, depending on your lottery investment. Assuming it is some kind of a lottery where you can buy lottery tickets, you would need to buy half of all tickets to have a higher chance to win by throwing away blocks.
I can't do the exact math, but probably the lottery reward can be much higher than 25 BTC until it makes sense for miners to try to cheat and throw away blocks.