It's not ideal but you can do that. You need to make sure you meet the bandwidth and latency requirements for clustering over the WAN which is in the CUCM SRND for the version you are installing. Additionally, you would want to consider the impact to bandwidth on the WAN link from Site B to Site A for calls traversing that link to hit the PSTN gateway because inbound PSTN calls destined to Site B phones as well as intracluster calls (calls from IP phones at Site A to Site B and vice versa) will also be travelling that link.
My recommendation would be to have at least one gateway at each site. If possible, let each site use it's own gateway for at least outbound traffic. In addition, if there is a loss of the WAN link between sites - then phones at each site could register to the local CCM and have a local gateway for outbound calls. Inbound calls for each site would depend on your number range and how the telco routes incoming calls (i.e., all thru one trunk - Site A - or split between PSTN trunks based on number).
Hailey
Please rate helpful posts.