Question: I'm currently a high school student trying to build an ultralight aircraft from scratch (I'm self taught and still learning from educational videos), but I don't have much savings (about RM 2.5k, which converts to roughly 587 USD), so I could only afford a small engine. 

Is it possible to achieve a certain propeller's efficient rpm by using gears while still using a small engine? Like those gearboxes found in cars to increase rpm.

Answer: 
Gliders fly without an engine and they do well :) Where I come from, it is common (and legal) to use an old car engine and build it into your own UL plane. Consider getting a car that is very old (70's or 80's) - these can be usually find either for free (after a rear crash) or very very cheap.

These old engines are also easy to remove and fit into an aircraft. In Europe, old Trabant engines are very common for this, but I am sure each region has some car model that is old, unused and waiting in planty in old scrapeyards.

If your legislation allows building a non-certified motor into your plane, than this wold be the way to go. These engines can easily output 40 to 80 kWs of power which is way more than you need.

*Safety notice: If you do this, the #1 rule is: Always remember the engine is non-certified and old, so always fly it like it should break the next minute - avoid flying over large forests and water areas.*
Keep in mind that I'm very interested in airplanes, but I don't fly anything full scale, so others may have better advice.

There's a very simple, very light homebuilt called the Sky Pup. I'm not sure, but I think the plans are still being sold. Many of these have been built, and they have a good reputation. I've read that the guys who designed it were aero engineers. The materials are mostly wood and extruded polystyrene foam. The instructions tell you that anything more than 20 hp is too much. You can find out more at machnone.com (My only connection with the Sky Pup is that I bought a set of plans and have read about it here and there.) If you weigh less than 170 lbs, you might find this a good choice.
Reduction drives are common, especially with two stroke engines. Another approach is to use half of a VW engine, although some of the power will be wasted. These engines are much too heavy for a Sky Pup, though. There's a design called the Legal Eagle, though, which uses a 1/2 VW engine. 

New paramotor engines are probably far beyond your budget, but they might give you an idea of what can be done. They all have belt drives to reduce the propeller rpm. However, keep in mind that reduction drives can have big problems, unless they're engineered just right or have been tested and modified many times.

Unless you are very good at scrounging, or prices are MUCH lower where you are than they are here in the USA, your budget won't go far enough. Maybe there are some glider designs, though, that could be done with less than $1000 (US). 

Depending on how an "ultralight" is defined in your country, there may be a bunch of other designs that you can use. For instance, the Pietenpol Sky Scout, which is smaller than the famous Air Camper, is meant for 20 or 30 hp (not sure which). It wasn't known for climbing quickly, but I expect a modern, lighter engine would help with that. I mention it because it's an old, low tech design which may be cheaper to build.

There are MANY other choices out there. Whatever you choose, get some flight training before flying solo. And be really careful when you're building it.