Yes you can go to a motorcycle dealer or someone else and buy a motorcycle even without a motorcycle license.
But without the motorcycle license you won't be able to drive the motorcycle home or anywhere else or be able to take the motorcycle out for a test drive.
You can always trailer the motorcycle home after buying it and then get your motorcycle license afterwards.