Careful here, because of the particle と, the first version of まるまる is actually the adverb version, meaning “entirely; completely; wholly”.
The second version is the verb for forming into a ball.