It's "legal", as in not against the law; but ill advised if you expect and desire to play with this partner again.
Modern agreements tend to the line of "forcing to 2NT, or 3 of a major, or 4 of a minor".
This guarantees the 2C opener 3 calls to define the hand, and infers that a 2C opening based on a strong minor suit must either be suitable for NT or about a trick better than one based on a strong major suit.
Also, consider partner's problem with a strong club or diamond hand. How could partner possibly describe this hand without the assurance of not being passed in a 3C or 3D rebid?
Update:
In regards to your specific situation, I would rank possible bids over partner's 3C rebid in this order with 2 HCP as follows:
- Bid 3 of any 6-card suit
- Bid 4C with 3 or more of them
- Bid any 5-card suit at the three level
- Bid 3D with Qxxx or JTxx of diamonds in an unbalanced hand, in case partner want to show a two-suiter
- Bid 3NT otherwise
Your 3NT should never end up as the final contract, because partner has denied all interest in NT by bidding 3C. This bid denies any extremely unbalanced hand, by failing the criteria for all the higher preferences; this is valuable to partner in assessing level and denomination.
If partner continues with 4C over any of these calls, you can pass. If partner bids a new suit this continues the force, and you must choose between:
- bid a new suit to show your value and promise 4+ support in partner's second suit;
- Jump in a new suit to show a singleton and 4+ support for partner's second suit;
- single-raise partner's suit with 3 or 4 of them.
- preference back to clubs with exactly 2 of them.
No other possibilities exist. This scheme is not in any way conventional, but simply common-sense natural bidding. Even the splinter jump has become a natural call, as what is termed an "impossible value-showing hand", and thus must be the exact opposite of it's literal meaning: instead of strong, length-showing denying support, it must be weak, shortness showing, and confirming support. While not all partners will recognize this call, all experts will.
If partner bids 4NT over your rebid this is Blackwood (with clubs as trump if you play key-card), and consequently forcing.