「ごめん、さっき聞いちゃった。もしかして秘密だったかな?ごめんね~」というのは Sorry for asking just then. I wonder if that was a secret by any chance? I'm sorry で言うことができます。
「もしかして内緒にして私をビックリさせたかったのかも!」という部分は I think you wanted to surprise me and that was meant to be secret と表現することができます。
参考になれば幸いです。
Sorry, I just heard about what you were making before. Maybe it was supposed to be a secret?
この場合、次のような言い方ができますよ。
ーSorry, I just heard about what you were making before. Maybe it was supposed to be a secret?
「ごめん、さっき何作ってるか聞いちゃった。もしかして秘密だった?」
Maybe it was supposed to be a secret? で「もしかして秘密だった?」と言えます。
ご参考まで!