Yes you can.
Just a matter of getting a handful of key things covered.
you'll need a comparable sized venturi.
Make certain the throttle cable can be aranged to reach the new carb
and not cause any kinking.
Make sure the new carb has a hole/connection to fit the cable end.
and be sure the carb shaft turns in the right direction for the cable to work it.
Be sure you can get full throttle with it.
Make sure the impulse holes line up between the carb and the motor.
now look at the choke operation, will it clear everything on the engine
and air filter, fuel lines, throttle cable etc.
Next are the fuel lines. make sure the new carb wont have a nipple pointed right into an obstruction and cause the fuel line to kink
or rub a hole in it.
If you use and like a purge bubble, make sure the new one has it and is in a location that you can access and that it dosent hit anything.
And after all of that..... are you comfortable with tuning it?
you'll need to tune by ear to get it correct.
Tach numbers will no longer be valid.
I sorta think that's about it!
Edit: Make sure the air filter will still fit and clear everything.
But IF the the stock one isn't damaged or worn, a GOOD thorugh cleaning and a kit should put ya back in the running.
The symptoms you describe are pretty typical of the usual
gummed up or dirty or bad fuel lines, etc that come with any other carb.
Need to make certain the tank or lines or fuel filter or vent...
arnt the cause
before you go to the trouble of swapping out the carb.
and of course a used carb can just as easily have some issues also!