2.5g tank pose a problem, the smaller the tank the harder to heat.
As it stands the smallest adjustable heater you can get is a 25w generally. These are much more desirable because they automatically switch off at the preset temperature ensuring no cooked fish.
You could try to see if a 25w would fit, mine is 18cm long. If that doesn't fit into your tank, and remember it must be submersed at least 3/4 - but this can depend on brand - your only other option are the un-adjustable betta mat heaters.
These are always cheap, and have only seen them made by no name brands mainly comming out of china. They do not switch off or have a setting temperature. They will always heat 5 degrees above room temperature regards of how hot it is.
For brands, suggestions and reviews: http://www.bettafish.com/showthread.php?t=82735